Skip to content

Commit b62d16f

Browse files
authored
Merge pull request #12 from ElectronicCats/dev
Patch to get the messages from the ECU
2 parents a85ca9d + f2adc35 commit b62d16f

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

Canbus_app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ dist/*
55
.editorconfig
66
.env
77
.ufbt
8+
9+
# Ignore the makefile
10+
Makefile

Canbus_app/libraries/mcp_can_2515.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,10 @@ ERROR_CAN send_can_message(FuriHalSpiBusHandle* spi, CANFRAME* frame, uint8_t tx
625625

626626
furi_hal_spi_release(spi);
627627

628-
read_register(spi, free_buffer - 1, &is_send_it);
628+
furi_delay_us(1);
629629
if(is_send_it == 0) res = ERROR_OK;
630630

631-
} while((res != ERROR_OK) && ((furi_get_tick() - time_waiting) < 1));
631+
} while((res != ERROR_OK) && ((furi_get_tick() - time_waiting) < 5));
632632

633633
if(is_send_it) return res;
634634

Canbus_app/libraries/pid_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bool read_frames(MCP2515* CAN, CANFRAME* frame) {
106106
uint32_t time_delay = 0;
107107

108108
do {
109-
if(read_can_message(CAN, frame)) {
109+
if(read_can_message(CAN, frame) == ERROR_OK) {
110110
if(frame->canId == 0x7e8) return true;
111111
}
112112
furi_delay_us(1);

Canbus_app/scenes/AboutUs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void draw_can_app_view(App* app) {
3232
widget_add_string_element(
3333
app->widget, 65, 20, AlignCenter, AlignCenter, FontPrimary, "CANBUS APP");
3434
widget_add_string_element(
35-
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "v1.2");
35+
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "v1.1.3");
3636

3737
widget_add_button_element(app->widget, GuiButtonTypeRight, "Next", button_callback, app);
3838
widget_add_button_element(app->widget, GuiButtonTypeLeft, "Prev", button_callback, app);

Canbus_app/scenes/Obd2Options/manualPIDSenderOption.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ void app_scene_manual_sender_pid_on_enter(void* context) {
108108
furi_string_reset(text);
109109
furi_string_cat_printf(text, "0x%x", service_to_send);
110110
item = variable_item_list_add(
111-
app->varList, "Service", 96, callback_manual_pid_sender_options, app);
111+
app->varList, "Service", 11, callback_manual_pid_sender_options, app);
112112
variable_item_set_current_value_index(item, service_to_send);
113113
variable_item_set_current_value_text(item, furi_string_get_cstr(text));
114114

115115
// Third item COUNT OF BYTES [2]
116116
furi_string_reset(text);
117117
furi_string_cat_printf(text, "%u", count_of_bytes);
118118
item = variable_item_list_add(
119-
app->varList, "Count Bytes", 7, callback_manual_pid_sender_options, app);
119+
app->varList, "Count Bytes", 3, callback_manual_pid_sender_options, app);
120120
variable_item_set_current_value_index(item, 0);
121121
variable_item_set_current_value_text(item, furi_string_get_cstr(text));
122122
variable_item_set_current_value_index(item, count_of_bytes);

0 commit comments

Comments
 (0)