[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 @@
|
||||
#include "irda-app.hpp"
|
||||
#include "sys/_stdint.h"
|
||||
#include <furi.h>
|
||||
#include <gui/gui.h>
|
||||
#include <input/input.h>
|
||||
@@ -154,3 +155,70 @@ void IrdaApp::set_edit_action(IrdaApp::EditAction value) {
|
||||
IrdaApp::EditAction IrdaApp::get_edit_action(void) {
|
||||
return action;
|
||||
}
|
||||
|
||||
void IrdaApp::set_current_button(int value) {
|
||||
current_button = value;
|
||||
}
|
||||
|
||||
int IrdaApp::get_current_button() {
|
||||
return current_button;
|
||||
}
|
||||
|
||||
void IrdaApp::notify_success() {
|
||||
notification_message(notification, &sequence_success);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_red_blink() {
|
||||
notification_message(notification, &sequence_blink_red_10);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_space_blink() {
|
||||
static const NotificationSequence sequence = {
|
||||
&message_green_0,
|
||||
&message_delay_50,
|
||||
&message_green_255,
|
||||
&message_do_not_reset,
|
||||
NULL,
|
||||
};
|
||||
|
||||
notification_message_block(notification, &sequence);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_click() {
|
||||
static const NotificationSequence sequence = {
|
||||
&message_click,
|
||||
&message_delay_1,
|
||||
&message_sound_off,
|
||||
NULL,
|
||||
};
|
||||
|
||||
notification_message_block(notification, &sequence);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_click_and_blink() {
|
||||
static const NotificationSequence sequence = {
|
||||
&message_click,
|
||||
&message_delay_1,
|
||||
&message_sound_off,
|
||||
&message_red_0,
|
||||
&message_green_255,
|
||||
&message_blue_0,
|
||||
&message_delay_10,
|
||||
&message_green_0,
|
||||
NULL,
|
||||
};
|
||||
|
||||
notification_message_block(notification, &sequence);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_double_vibro() {
|
||||
notification_message(notification, &sequence_double_vibro);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_green_on() {
|
||||
notification_message(notification, &sequence_set_only_green_255);
|
||||
}
|
||||
|
||||
void IrdaApp::notify_green_off() {
|
||||
notification_message(notification, &sequence_reset_green);
|
||||
}
|
||||
|
Reference in New Issue
Block a user