fixing typos, satus -> status (#1422)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Wyatt Neal 2022-07-25 10:35:02 -04:00 committed by GitHub
parent d80edba891
commit ac60d1808a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 45 deletions

View File

@ -26,7 +26,7 @@ typedef struct {
bool rssi_history_end; bool rssi_history_end;
uint8_t ind_write; uint8_t ind_write;
uint8_t ind_sin; uint8_t ind_sin;
SubGhzReadRAWStatus satus; SubGhzReadRAWStatus status;
} SubGhzReadRAWModel; } SubGhzReadRAWModel;
void subghz_read_raw_set_callback( void subghz_read_raw_set_callback(
@ -88,21 +88,21 @@ void subghz_read_raw_stop_send(SubGhzReadRAW* instance) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
switch(model->satus) { switch(model->status) {
case SubGhzReadRAWStatusTXRepeat: case SubGhzReadRAWStatusTXRepeat:
case SubGhzReadRAWStatusLoadKeyTXRepeat: case SubGhzReadRAWStatusLoadKeyTXRepeat:
instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context); instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context);
break; break;
case SubGhzReadRAWStatusTX: case SubGhzReadRAWStatusTX:
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
break; break;
case SubGhzReadRAWStatusLoadKeyTX: case SubGhzReadRAWStatusLoadKeyTX:
model->satus = SubGhzReadRAWStatusLoadKeyIDLE; model->status = SubGhzReadRAWStatusLoadKeyIDLE;
break; break;
default: default:
FURI_LOG_W(TAG, "unknown status"); FURI_LOG_W(TAG, "unknown status");
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
break; break;
} }
return true; return true;
@ -225,7 +225,7 @@ void subghz_read_raw_draw(Canvas* canvas, SubGhzReadRAWModel* model) {
canvas_draw_line(canvas, 0, 48, 115, 48); canvas_draw_line(canvas, 0, 48, 115, 48);
canvas_draw_line(canvas, 115, 14, 115, 48); canvas_draw_line(canvas, 115, 14, 115, 48);
switch(model->satus) { switch(model->status) {
case SubGhzReadRAWStatusIDLE: case SubGhzReadRAWStatusIDLE:
elements_button_left(canvas, "Erase"); elements_button_left(canvas, "Erase");
elements_button_center(canvas, "Send"); elements_button_center(canvas, "Send");
@ -289,26 +289,26 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
uint8_t ret = false; uint8_t ret = false;
switch(model->satus) { switch(model->status) {
case SubGhzReadRAWStatusIDLE: case SubGhzReadRAWStatusIDLE:
// Start TX // Start TX
instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context); instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context);
model->satus = SubGhzReadRAWStatusTXRepeat; model->status = SubGhzReadRAWStatusTXRepeat;
ret = true; ret = true;
break; break;
case SubGhzReadRAWStatusTX: case SubGhzReadRAWStatusTX:
// Start TXRepeat // Start TXRepeat
model->satus = SubGhzReadRAWStatusTXRepeat; model->status = SubGhzReadRAWStatusTXRepeat;
break; break;
case SubGhzReadRAWStatusLoadKeyIDLE: case SubGhzReadRAWStatusLoadKeyIDLE:
// Start Load Key TX // Start Load Key TX
instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context); instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context);
model->satus = SubGhzReadRAWStatusLoadKeyTXRepeat; model->status = SubGhzReadRAWStatusLoadKeyTXRepeat;
ret = true; ret = true;
break; break;
case SubGhzReadRAWStatusLoadKeyTX: case SubGhzReadRAWStatusLoadKeyTX:
// Start Load Key TXRepeat // Start Load Key TXRepeat
model->satus = SubGhzReadRAWStatusLoadKeyTXRepeat; model->status = SubGhzReadRAWStatusLoadKeyTXRepeat;
break; break;
default: default:
@ -319,33 +319,33 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
} else if(event->key == InputKeyOk && event->type == InputTypeRelease) { } else if(event->key == InputKeyOk && event->type == InputTypeRelease) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
if(model->satus == SubGhzReadRAWStatusTXRepeat) { if(model->status == SubGhzReadRAWStatusTXRepeat) {
// Stop repeat TX // Stop repeat TX
model->satus = SubGhzReadRAWStatusTX; model->status = SubGhzReadRAWStatusTX;
} else if(model->satus == SubGhzReadRAWStatusLoadKeyTXRepeat) { } else if(model->status == SubGhzReadRAWStatusLoadKeyTXRepeat) {
// Stop repeat TX // Stop repeat TX
model->satus = SubGhzReadRAWStatusLoadKeyTX; model->status = SubGhzReadRAWStatusLoadKeyTX;
} }
return false; return false;
}); });
} else if(event->key == InputKeyBack && event->type == InputTypeShort) { } else if(event->key == InputKeyBack && event->type == InputTypeShort) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
switch(model->satus) { switch(model->status) {
case SubGhzReadRAWStatusREC: case SubGhzReadRAWStatusREC:
//Stop REC //Stop REC
instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context); instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context);
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
break; break;
case SubGhzReadRAWStatusLoadKeyTX: case SubGhzReadRAWStatusLoadKeyTX:
//Stop TxRx //Stop TxRx
instance->callback(SubGhzCustomEventViewReadRAWTXRXStop, instance->context); instance->callback(SubGhzCustomEventViewReadRAWTXRXStop, instance->context);
model->satus = SubGhzReadRAWStatusLoadKeyIDLE; model->status = SubGhzReadRAWStatusLoadKeyIDLE;
break; break;
case SubGhzReadRAWStatusTX: case SubGhzReadRAWStatusTX:
//Stop TxRx //Stop TxRx
instance->callback(SubGhzCustomEventViewReadRAWTXRXStop, instance->context); instance->callback(SubGhzCustomEventViewReadRAWTXRXStop, instance->context);
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
break; break;
case SubGhzReadRAWStatusLoadKeyIDLE: case SubGhzReadRAWStatusLoadKeyIDLE:
//Exit //Exit
@ -362,14 +362,14 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
} else if(event->key == InputKeyLeft && event->type == InputTypeShort) { } else if(event->key == InputKeyLeft && event->type == InputTypeShort) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
if(model->satus == SubGhzReadRAWStatusStart) { if(model->status == SubGhzReadRAWStatusStart) {
//Config //Config
instance->callback(SubGhzCustomEventViewReadRAWConfig, instance->context); instance->callback(SubGhzCustomEventViewReadRAWConfig, instance->context);
} else if( } else if(
(model->satus == SubGhzReadRAWStatusIDLE) || (model->status == SubGhzReadRAWStatusIDLE) ||
(model->satus == SubGhzReadRAWStatusLoadKeyIDLE)) { (model->status == SubGhzReadRAWStatusLoadKeyIDLE)) {
//Erase //Erase
model->satus = SubGhzReadRAWStatusStart; model->status = SubGhzReadRAWStatusStart;
model->rssi_history_end = false; model->rssi_history_end = false;
model->ind_write = 0; model->ind_write = 0;
string_set_str(model->sample_write, "0 spl."); string_set_str(model->sample_write, "0 spl.");
@ -381,10 +381,10 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
} else if(event->key == InputKeyRight && event->type == InputTypeShort) { } else if(event->key == InputKeyRight && event->type == InputTypeShort) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
if(model->satus == SubGhzReadRAWStatusIDLE) { if(model->status == SubGhzReadRAWStatusIDLE) {
//Save //Save
instance->callback(SubGhzCustomEventViewReadRAWSave, instance->context); instance->callback(SubGhzCustomEventViewReadRAWSave, instance->context);
} else if(model->satus == SubGhzReadRAWStatusLoadKeyIDLE) { } else if(model->status == SubGhzReadRAWStatusLoadKeyIDLE) {
//More //More
instance->callback(SubGhzCustomEventViewReadRAWMore, instance->context); instance->callback(SubGhzCustomEventViewReadRAWMore, instance->context);
} }
@ -393,16 +393,16 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
} else if(event->key == InputKeyOk && event->type == InputTypeShort) { } else if(event->key == InputKeyOk && event->type == InputTypeShort) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
if(model->satus == SubGhzReadRAWStatusStart) { if(model->status == SubGhzReadRAWStatusStart) {
//Record //Record
instance->callback(SubGhzCustomEventViewReadRAWREC, instance->context); instance->callback(SubGhzCustomEventViewReadRAWREC, instance->context);
model->satus = SubGhzReadRAWStatusREC; model->status = SubGhzReadRAWStatusREC;
model->ind_write = 0; model->ind_write = 0;
model->rssi_history_end = false; model->rssi_history_end = false;
} else if(model->satus == SubGhzReadRAWStatusREC) { } else if(model->status == SubGhzReadRAWStatusREC) {
//Stop //Stop
instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context); instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context);
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
} }
return true; return true;
}); });
@ -412,15 +412,15 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
void subghz_read_raw_set_status( void subghz_read_raw_set_status(
SubGhzReadRAW* instance, SubGhzReadRAW* instance,
SubGhzReadRAWStatus satus, SubGhzReadRAWStatus status,
const char* file_name) { const char* file_name) {
furi_assert(instance); furi_assert(instance);
switch(satus) { switch(status) {
case SubGhzReadRAWStatusStart: case SubGhzReadRAWStatusStart:
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
model->satus = SubGhzReadRAWStatusStart; model->status = SubGhzReadRAWStatusStart;
model->rssi_history_end = false; model->rssi_history_end = false;
model->ind_write = 0; model->ind_write = 0;
string_reset(model->file_name); string_reset(model->file_name);
@ -431,14 +431,14 @@ void subghz_read_raw_set_status(
case SubGhzReadRAWStatusIDLE: case SubGhzReadRAWStatusIDLE:
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
model->satus = SubGhzReadRAWStatusIDLE; model->status = SubGhzReadRAWStatusIDLE;
return true; return true;
}); });
break; break;
case SubGhzReadRAWStatusLoadKeyTX: case SubGhzReadRAWStatusLoadKeyTX:
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
model->satus = SubGhzReadRAWStatusLoadKeyIDLE; model->status = SubGhzReadRAWStatusLoadKeyIDLE;
model->rssi_history_end = false; model->rssi_history_end = false;
model->ind_write = 0; model->ind_write = 0;
string_set_str(model->file_name, file_name); string_set_str(model->file_name, file_name);
@ -449,7 +449,7 @@ void subghz_read_raw_set_status(
case SubGhzReadRAWStatusSaveKey: case SubGhzReadRAWStatusSaveKey:
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
model->satus = SubGhzReadRAWStatusLoadKeyIDLE; model->status = SubGhzReadRAWStatusLoadKeyIDLE;
if(!model->ind_write) { if(!model->ind_write) {
string_set_str(model->file_name, file_name); string_set_str(model->file_name, file_name);
string_set_str(model->sample_write, "RAW"); string_set_str(model->sample_write, "RAW");
@ -477,11 +477,11 @@ void subghz_read_raw_exit(void* context) {
with_view_model( with_view_model(
instance->view, (SubGhzReadRAWModel * model) { instance->view, (SubGhzReadRAWModel * model) {
if(model->satus != SubGhzReadRAWStatusIDLE && if(model->status != SubGhzReadRAWStatusIDLE &&
model->satus != SubGhzReadRAWStatusStart && model->status != SubGhzReadRAWStatusStart &&
model->satus != SubGhzReadRAWStatusLoadKeyIDLE) { model->status != SubGhzReadRAWStatusLoadKeyIDLE) {
instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context); instance->callback(SubGhzCustomEventViewReadRAWIDLE, instance->context);
model->satus = SubGhzReadRAWStatusStart; model->status = SubGhzReadRAWStatusStart;
} }
return true; return true;
}); });

View File

@ -44,7 +44,7 @@ void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi);
void subghz_read_raw_set_status( void subghz_read_raw_set_status(
SubGhzReadRAW* instance, SubGhzReadRAW* instance,
SubGhzReadRAWStatus satus, SubGhzReadRAWStatus status,
const char* file_name); const char* file_name);
View* subghz_read_raw_get_view(SubGhzReadRAW* subghz_static); View* subghz_read_raw_get_view(SubGhzReadRAW* subghz_static);

View File

@ -25,7 +25,7 @@ static const uint32_t subghz_test_static_keys[] = {
struct SubGhzTestStatic { struct SubGhzTestStatic {
View* view; View* view;
SubGhzTestStaticStatus satus_tx; SubGhzTestStaticStatus status_tx;
SubGhzEncoderPrinceton* encoder; SubGhzEncoderPrinceton* encoder;
SubGhzTestStaticCallback callback; SubGhzTestStaticCallback callback;
void* context; void* context;
@ -113,10 +113,10 @@ bool subghz_test_static_input(InputEvent* event, void* context) {
furi_hal_subghz_start_async_tx( furi_hal_subghz_start_async_tx(
subghz_encoder_princeton_for_testing_yield, instance->encoder); subghz_encoder_princeton_for_testing_yield, instance->encoder);
instance->satus_tx = SubGhzTestStaticStatusTX; instance->status_tx = SubGhzTestStaticStatusTX;
} }
} else if(event->type == InputTypeRelease) { } else if(event->type == InputTypeRelease) {
if(instance->satus_tx == SubGhzTestStaticStatusTX) { if(instance->status_tx == SubGhzTestStaticStatusTX) {
FURI_LOG_I(TAG, "TX Stop"); FURI_LOG_I(TAG, "TX Stop");
subghz_encoder_princeton_for_testing_stop( subghz_encoder_princeton_for_testing_stop(
instance->encoder, furi_get_tick()); instance->encoder, furi_get_tick());
@ -124,7 +124,7 @@ bool subghz_test_static_input(InputEvent* event, void* context) {
furi_hal_subghz_stop_async_tx(); furi_hal_subghz_stop_async_tx();
notification_message(notification, &sequence_reset_red); notification_message(notification, &sequence_reset_red);
} }
instance->satus_tx = SubGhzTestStaticStatusIDLE; instance->status_tx = SubGhzTestStaticStatusIDLE;
} }
furi_record_close("notification"); furi_record_close("notification");
} }
@ -144,7 +144,7 @@ void subghz_test_static_enter(void* context) {
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_cc1101_g0, false); furi_hal_gpio_write(&gpio_cc1101_g0, false);
instance->satus_tx = SubGhzTestStaticStatusIDLE; instance->status_tx = SubGhzTestStaticStatusIDLE;
with_view_model( with_view_model(
instance->view, (SubGhzTestStaticModel * model) { instance->view, (SubGhzTestStaticModel * model) {