Skip to content

Commit

Permalink
feat: qr added on AboutUs option
Browse files Browse the repository at this point in the history
  • Loading branch information
AdonaiDiazEsparza committed Oct 29, 2024
1 parent dbec1e4 commit 99b4702
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 23 deletions.
2 changes: 2 additions & 0 deletions Canbus_app/app_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "libraries/mcp_can_2515.h"
#include "libraries/pid_library.h"

#include "canbus_app_icons.h"

#define PATHAPP "apps_data/canbus"
#define PATHAPPEXT EXT_PATH(PATHAPP)
#define PATHLOGS PATHAPPEXT "/logs"
Expand Down
1 change: 1 addition & 0 deletions Canbus_app/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ App(
stack_size=30 * 1024,
fap_icon="icon.png",
fap_category="ElectronicCats",
fap_icon_assets="assets",
)
Binary file added Canbus_app/assets/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Canbus_app/dist/canbus_app.fap
Binary file not shown.
Binary file modified Canbus_app/dist/debug/canbus_app_d.elf
Binary file not shown.
2 changes: 1 addition & 1 deletion Canbus_app/libraries/pid_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bool clear_dtc(OBDII* obdii) {

ERROR_CAN ret = ERROR_OK;

frame.buffer[0] = 2;
frame.buffer[0] = 1;
frame.buffer[1] = CLEAR_STORAGE_DTC;
frame.buffer[2] = 0;

Expand Down
26 changes: 4 additions & 22 deletions Canbus_app/scenes/AboutUs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,12 @@ static void draw_can_app_view(App* app) {
widget_add_string_element(
app->widget, 65, 20, AlignCenter, AlignCenter, FontPrimary, "CANBUS APP");
widget_add_string_element(
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "By: Adonai Diaz");
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "v1.2");

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

static void draw_version_view(App* app) {
widget_reset(app->widget);
widget_add_string_element(
app->widget, 65, 20, AlignCenter, AlignCenter, FontPrimary, "Version:");
widget_add_string_element(
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "CANBUS APP V1.1.0.0");
widget_add_button_element(app->widget, GuiButtonTypeRight, "Next", button_callback, app);
widget_add_button_element(app->widget, GuiButtonTypeLeft, "Prev", button_callback, app);
}

static void draw_license_view(App* app) {
widget_reset(app->widget);
widget_add_string_element(
Expand All @@ -61,15 +51,10 @@ static void draw_license_view(App* app) {
void draw_more_info_view(App* app) {
widget_reset(app->widget);
widget_add_string_element(
app->widget, 65, 10, AlignCenter, AlignCenter, FontPrimary, "More info:");
widget_add_string_element(
app->widget, 65, 25, AlignCenter, AlignCenter, FontSecondary, "https://github.com");
app->widget, 10, 5, AlignLeft, AlignCenter, FontPrimary, "More info:");

widget_add_string_element(
app->widget, 65, 35, AlignCenter, AlignCenter, FontSecondary, "/ElectronicCats");
widget_add_icon_element(app->widget, 48, 15, &I_qr_code);

Check failure on line 56 in Canbus_app/scenes/AboutUs.c

View workflow job for this annotation

GitHub Actions / ufbt: Build for Dev branch

'I_qr_code' undeclared (first use in this function); did you mean 'I_qrcode'?

widget_add_string_element(
app->widget, 65, 45, AlignCenter, AlignCenter, FontSecondary, "/flipper-MCP2515-CANBUS");
widget_add_button_element(app->widget, GuiButtonTypeLeft, "Prev", button_callback, app);
}

Expand All @@ -95,12 +80,9 @@ bool app_scene_about_us_on_event(void* context, SceneManagerEvent event) {
draw_can_app_view(app);
break;
case 2:
draw_version_view(app);
break;
case 3:
draw_license_view(app);
break;
case 4:
case 3:
draw_more_info_view(app);
break;
default:
Expand Down

0 comments on commit 99b4702

Please sign in to comment.