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

Function keeloq_save

src/modules/rf/rf_send.cpp:112–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void keeloq_save(RfCodes data) {
113 String subfile_out = "Filetype: Bruce SubGhz File\nVersion 1\n";
114 subfile_out += "Frequency: " + String(data.frequency) + "\n";
115 subfile_out += "Preset: " + String(data.preset) + "\n";
116 subfile_out += "Protocol: RcSwitch\n";
117 subfile_out += "Bit: " + String(data.Bit) + "\n";
118
119 subfile_out += "Manufacturer: " + String(data.mf_name) + "\n";
120 char hexString[64] = {0};
121
122 decimalToHexString(data.serial, hexString);
123
124 subfile_out += "Serial: " + String(hexString) + "\n";
125 subfile_out += "Button: " + String(data.btn) + "\n";
126 subfile_out += "Counter: " + String(data.cnt) + "\n";
127
128 subfile_out += "TE: " + String(data.te) + "\n";
129
130 File file = filesystem->open(filepath, "w", true);
131
132 if (file) { file.println(subfile_out); }
133
134 file.close();
135}
136
137void loopEmulate(RfCodes &data) {
138 if (data.serial != 0) {

Callers 1

loopEmulateFunction · 0.85

Calls 3

decimalToHexStringFunction · 0.85
closeMethod · 0.80
printlnMethod · 0.45

Tested by

no test coverage detected