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

Function loopEmulate

src/modules/rf/rf_send.cpp:137–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void loopEmulate(RfCodes &data) {
138 if (data.serial != 0) {
139 data.fix = data.btn << 28 | data.serial;
140 data.Bit = 64;
141 data.keeloq_step(0);
142 }
143
144 display_info(data);
145
146 while (1) {
147 if (check(EscPress)) {
148 keyList.clear();
149 bitList.clear();
150
151 return;
152 }
153
154 if (check(NextPress)) {
155 select_menu_option(data.serial != 0);
156
157 if (returnToMenu) {
158 keyList.clear();
159 bitList.clear();
160
161 return;
162 }
163
164 display_info(data);
165 }
166
167 if (check(SelPress)) {
168 blinkLed();
169
170 if (data.serial == 0) {
171 for (int i = 0; uint64_t key : keyList) {
172 data.Bit = bitList[i++];
173 data.key = key;
174 sendRfCommand(data);
175 }
176 } else {
177 sendRfCommand(data);
178 data.keeloq_step(num_steps_keeloq);
179 keeloq_save(data);
180 display_info(data);
181 }
182 }
183 }
184}
185
186void display_info(RfCodes &data) {
187 char hexString[64] = {0};

Callers 1

sendCustomRFFunction · 0.85

Calls 8

checkFunction · 0.85
select_menu_optionFunction · 0.85
blinkLedFunction · 0.85
sendRfCommandFunction · 0.85
keeloq_saveFunction · 0.85
keeloq_stepMethod · 0.80
display_infoFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected