[FL-1505] Add RAW format (#576)
* Add RAW format * F5 stubs for build to pass * Fix saving decoded signal error * Irda: set ISR before starting timer, remove explicit NVIC configuration Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,17 +1,26 @@
|
||||
#pragma once
|
||||
#include "file_reader/file_reader.hpp"
|
||||
#include "irda.h"
|
||||
#include <file_reader/file_reader.h>
|
||||
#include <irda.h>
|
||||
#include "irda-app-remote-manager.hpp"
|
||||
|
||||
class IrdaAppFileParser : public FileReader {
|
||||
public:
|
||||
typedef struct {
|
||||
char name[32];
|
||||
IrdaMessage message;
|
||||
} IrdaFileMessage;
|
||||
IrdaAppSignal signal;
|
||||
} IrdaFileSignal;
|
||||
|
||||
std::unique_ptr<IrdaAppFileParser::IrdaFileMessage> read_message(File* file);
|
||||
IrdaAppFileParser() {
|
||||
/* Assume we can save max 512 samples */
|
||||
set_max_line_length(max_line_length);
|
||||
}
|
||||
|
||||
std::unique_ptr<IrdaAppFileParser::IrdaFileSignal> read_signal(File* file);
|
||||
bool store_signal(File* file, const IrdaAppSignal& signal, const char* name);
|
||||
|
||||
private:
|
||||
std::unique_ptr<IrdaFileMessage> parse_message(const std::string& str) const;
|
||||
static const uint32_t max_line_length;
|
||||
std::unique_ptr<IrdaFileSignal> parse_signal(const std::string& str) const;
|
||||
std::unique_ptr<IrdaFileSignal> parse_signal_raw(const std::string& str) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user