[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:
@@ -14,13 +14,22 @@ void IrdaAppSceneLearn::on_enter(IrdaApp* app) {
|
||||
popup, "Point the remote at IR port\nand push the button", 5, 10, AlignLeft, AlignCenter);
|
||||
popup_set_callback(popup, NULL);
|
||||
|
||||
if(app->get_learn_new_remote()) {
|
||||
app->notify_double_vibro();
|
||||
}
|
||||
|
||||
view_manager->switch_to(IrdaAppViewManager::ViewType::Popup);
|
||||
}
|
||||
|
||||
bool IrdaAppSceneLearn::on_event(IrdaApp* app, IrdaAppEvent* event) {
|
||||
bool consumed = false;
|
||||
|
||||
if(event->type == IrdaAppEvent::Type::Tick) {
|
||||
consumed = true;
|
||||
app->notify_red_blink();
|
||||
}
|
||||
if(event->type == IrdaAppEvent::Type::IrdaMessageReceived) {
|
||||
app->notify_success();
|
||||
app->switch_to_next_scene_without_saving(IrdaApp::Scene::LearnSuccess);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user