Skip to content

Commit

Permalink
fix: display device not connected in Speed Detector
Browse files Browse the repository at this point in the history
  • Loading branch information
AdonaiDiazEsparza committed Dec 10, 2024
1 parent 359d474 commit d65c881
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Canbus_app/scenes/DetectorSpeedOption.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ static int32_t thread_to_detect_speed(void* context) {

bool debug = (mcp2515_init(mcp_can) == ERROR_OK) ? true : false;

if(!debug) draw_device_no_connected(app);
if(!debug)
draw_device_no_connected(app);

else
draw_detecting_speed(app);

furi_delay_ms(100);

Expand All @@ -114,8 +118,6 @@ static int32_t thread_to_detect_speed(void* context) {

ERROR_CAN response = ERROR_NOMSG;

draw_detecting_speed(app);

while(debug) {
response = is_this_bitrate(mcp_can, bitrates[bitrate_selector]);

Expand Down
2 changes: 1 addition & 1 deletion Canbus_app/scenes/mainMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void app_scene_menu_on_enter(void* context) {
app->submenu, "Sniffing", SniffingTestOption, basic_scenes_menu_callback, app);

submenu_add_item(
app->submenu, "SpeedDetector", SpeedDetectorOption, basic_scenes_menu_callback, app);
app->submenu, "Speed Detector", SpeedDetectorOption, basic_scenes_menu_callback, app);

submenu_add_item(app->submenu, "Sender", SenderOption, basic_scenes_menu_callback, app);

Expand Down

0 comments on commit d65c881

Please sign in to comment.