mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-23 01:18:12 -07:00
Merge remote-tracking branch 'ul/dev' into mntm-dev --nobuild
This commit is contained in:
@@ -75,7 +75,7 @@ void ibutton_worker_mode_idle_stop(iButtonWorker* worker) {
|
||||
|
||||
void ibutton_worker_mode_read_start(iButtonWorker* worker) {
|
||||
UNUSED(worker);
|
||||
furi_hal_power_enable_otg();
|
||||
if(!furi_hal_power_is_otg_enabled()) furi_hal_power_enable_otg();
|
||||
}
|
||||
|
||||
void ibutton_worker_mode_read_tick(iButtonWorker* worker) {
|
||||
@@ -90,7 +90,7 @@ void ibutton_worker_mode_read_tick(iButtonWorker* worker) {
|
||||
|
||||
void ibutton_worker_mode_read_stop(iButtonWorker* worker) {
|
||||
UNUSED(worker);
|
||||
furi_hal_power_disable_otg();
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
}
|
||||
|
||||
/*********************** EMULATE ***********************/
|
||||
@@ -120,7 +120,7 @@ void ibutton_worker_mode_emulate_stop(iButtonWorker* worker) {
|
||||
|
||||
void ibutton_worker_mode_write_common_start(iButtonWorker* worker) { //-V524
|
||||
UNUSED(worker);
|
||||
furi_hal_power_enable_otg();
|
||||
if(!furi_hal_power_is_otg_enabled()) furi_hal_power_enable_otg();
|
||||
}
|
||||
|
||||
void ibutton_worker_mode_write_id_tick(iButtonWorker* worker) {
|
||||
@@ -149,5 +149,5 @@ void ibutton_worker_mode_write_copy_tick(iButtonWorker* worker) {
|
||||
|
||||
void ibutton_worker_mode_write_common_stop(iButtonWorker* worker) { //-V524
|
||||
UNUSED(worker);
|
||||
furi_hal_power_disable_otg();
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
}
|
||||
|
||||
@@ -496,8 +496,10 @@ void subghz_protocol_decoder_gangqi_get_string(void* context, FuriString* output
|
||||
(instance->generic.serial & 0xFF);
|
||||
// Returns true if serial is valid
|
||||
bool serial_is_valid =
|
||||
((!(sum_3bytes_serial & 0x3)) &&
|
||||
((0xb2 < sum_3bytes_serial) && (sum_3bytes_serial < 0x1ae)));
|
||||
(((!(sum_3bytes_serial & 0x3)) &&
|
||||
((0xB < sum_3bytes_serial) && (sum_3bytes_serial < 0x141))) &&
|
||||
((((instance->generic.serial >> 16) & 0xFF) == 0x2) ||
|
||||
(((instance->generic.serial >> 16) & 0xFF) == 0x3)));
|
||||
|
||||
furi_string_cat_printf(
|
||||
output,
|
||||
|
||||
Reference in New Issue
Block a user