MCPcopy Create free account
hub / github.com/BruceDevices/firmware / selectRecentRfMenu

Function selectRecentRfMenu

src/modules/rf/rf_utils.cpp:474–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474struct RfCodes selectRecentRfMenu() {
475 options = {};
476 bool exit = false;
477 struct RfCodes selected_code;
478
479 for (int i = 0; i < 16; i++) {
480 if (recent_rfcodes[i].filepath == "") continue; // not inited
481
482 options.emplace_back(recent_rfcodes[i].filepath.c_str(), [i, &selected_code]() {
483 selected_code = recent_rfcodes[i];
484 });
485 }
486 options.emplace_back("Main Menu", [&]() { exit = true; });
487
488 loopOptions(options);
489 options.clear();
490
491 return selected_code;
492}
493rmt_channel_handle_t setup_rf_rx() {
494 if (!initRfModule("rx", bruceConfigPins.rfFreq)) return NULL;
495 setMHZ(bruceConfigPins.rfFreq);

Callers 1

sendCustomRFFunction · 0.85

Calls 2

loopOptionsFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected