unleashed-firmware/applications/irda/irda-app-file-parser.hpp
Albert Kharisov 13c5a8cb20
[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>
2021-07-16 19:43:54 +03:00

26 lines
770 B
C++

#pragma once
#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];
IrdaAppSignal signal;
} IrdaFileSignal;
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:
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;
};