[FL-1369, FL-1397, FL-1420] IRDA + SDcard (#513)
* Add saving to SD-Card (not ready yet) * Add saving to SD-card (done) * Select previous menu item * Fix central button * Fix current_button * Refactoring * Add notifications * [FL-1417] Add IRDA CLI CLI commands: 1) ir_rx Receives all IR-trafic, decodes and prints result to stdout 2) ir_tx <protocol> <address> <command> Transmits IR-signal. Address and command are hex-formatted * Fix BUG with random memory corruption at random time in random place in random universe in random unknown space and time forever amen * Fix submenu set_selected_item * Bring protocol order back * Add TODO sdcard check
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "sys/_stdint.h"
|
||||
#include <map>
|
||||
#include <irda.h>
|
||||
#include <furi.h>
|
||||
@@ -9,6 +10,7 @@
|
||||
#include "irda-app-receiver.hpp"
|
||||
#include <forward_list>
|
||||
#include <stdint.h>
|
||||
#include <notification/notification-messages.h>
|
||||
|
||||
|
||||
class IrdaApp {
|
||||
@@ -65,11 +67,29 @@ public:
|
||||
bool get_learn_new_remote();
|
||||
void set_learn_new_remote(bool value);
|
||||
|
||||
enum : int {
|
||||
ButtonNA = -1,
|
||||
};
|
||||
int get_current_button();
|
||||
void set_current_button(int value);
|
||||
|
||||
void notify_success();
|
||||
void notify_red_blink();
|
||||
void notify_space_blink();
|
||||
void notify_double_vibro();
|
||||
void notify_green_on();
|
||||
void notify_green_off();
|
||||
void notify_click();
|
||||
void notify_click_and_blink();
|
||||
|
||||
static void text_input_callback(void* context, char* text);
|
||||
static void popup_callback(void* context);
|
||||
|
||||
IrdaApp() {}
|
||||
IrdaApp() {
|
||||
notification = static_cast<NotificationApp*>(furi_record_open("notification"));
|
||||
}
|
||||
~IrdaApp() {
|
||||
furi_record_close("notification");
|
||||
for (auto &it : scenes)
|
||||
delete it.second;
|
||||
}
|
||||
@@ -80,7 +100,9 @@ private:
|
||||
bool learn_new_remote;
|
||||
EditElement element;
|
||||
EditAction action;
|
||||
uint32_t current_button;
|
||||
|
||||
NotificationApp* notification;
|
||||
IrdaAppSignalReceiver receiver;
|
||||
IrdaAppViewManager view_manager;
|
||||
IrdaAppRemoteManager remote_manager;
|
||||
|
||||
Reference in New Issue
Block a user