Merge remote-tracking branch 'mntm/dev' into kiisu-mntm

This commit is contained in:
WillyJL
2025-06-07 16:07:57 +01:00
12 changed files with 359 additions and 12 deletions
+10 -1
View File
@@ -79,6 +79,8 @@ struct InfraredWorker {
bool overrun;
} rx;
};
bool decode_force;
};
typedef struct {
@@ -143,7 +145,7 @@ static void
if(instance->rx.received_signal_callback)
instance->rx.received_signal_callback(
instance->rx.received_signal_context, &instance->signal);
} else {
} else if(!instance->decode_force) {
/* Skip first timing if it starts from Space */
if((instance->signal.timings_cnt == 0) && !level) {
return;
@@ -236,6 +238,7 @@ InfraredWorker* infrared_worker_alloc(void) {
instance->infrared_encoder = infrared_alloc_encoder();
instance->blink_enable = false;
instance->decode_enable = true;
instance->decode_force = false;
instance->notification = furi_record_open(RECORD_NOTIFICATION);
instance->state = InfraredWorkerStateIdle;
@@ -326,6 +329,12 @@ void infrared_worker_rx_enable_signal_decoding(InfraredWorker* instance, bool en
instance->decode_enable = enable;
}
void infrared_worker_rx_force_signal_decoding(InfraredWorker* instance, bool force) {
furi_check(instance);
instance->decode_force = force;
}
void infrared_worker_tx_start(InfraredWorker* instance) {
furi_check(instance);
furi_check(instance->state == InfraredWorkerStateIdle);
+8
View File
@@ -84,6 +84,14 @@ void infrared_worker_rx_enable_blink_on_receiving(InfraredWorker* instance, bool
*/
void infrared_worker_rx_enable_signal_decoding(InfraredWorker* instance, bool enable);
/** Force decoding of received infrared signals, will ignore RAW signals.
*
* @param[in] instance - instance of InfraredWorker
* @param[in] enable - true if you want to force decoding
* false otherwise
*/
void infrared_worker_rx_force_signal_decoding(InfraredWorker* instance, bool force);
/** Clarify is received signal either decoded or raw
*
* @param[in] signal - received signal
+4 -2
View File
@@ -374,11 +374,13 @@ void protocol_em4100_render_data(ProtocolEM4100* protocol, FuriString* result) {
furi_string_printf(
result,
"FC: %03u Card: %05hu CL:%hhu\n"
"DEZ 8: %08lu",
"DEZ 8: %08lu\n"
"DEZ 10: %010lu",
data[2],
(uint16_t)((data[3] << 8) | (data[4])),
protocol->clock_per_bit,
(uint32_t)((data[2] << 16) | (data[3] << 8) | (data[4])));
(uint32_t)((data[2] << 16) | (data[3] << 8) | (data[4])),
(uint32_t)((data[1] << 24) | (data[2] << 16) | (data[3] << 8) | (data[4])));
}
const ProtocolBase protocol_em4100 = {