Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tjko committed Sep 3, 2024
1 parent 1bb4944 commit f5502c3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)


project(fanpico
VERSION 1.7.0
VERSION 1.7.1
DESCRIPTION "FanPico - Programmable PWM (PC) Fan Controller"
HOMEPAGE_URL https://kokkonen.net/fanpico/
LANGUAGES C CXX ASM
)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)


set(FANPICO_BUILD beta CACHE STRING "Fanpico Build Tag")
set(FANPICO_BOARD 0804D CACHE STRING "Fanpico Board Model")
#set_property(CACHE FANPICO_BOARD PROPERTY STRINGS 0804 0804D 0401D)
set(FANPICO_CUSTOM_THEME 0 CACHE STRING "Fanpico LCD Custom Theme")
Expand Down
5 changes: 3 additions & 2 deletions src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ int cmd_idn(const char *cmd, const char *args, int query, struct prev_cmd_t *pre
pico_get_unique_board_id(&board_id);
for (i = 0; i < PICO_UNIQUE_BOARD_ID_SIZE_BYTES; i++)
printf("%02x", board_id.id[i]);
printf(",%s\n", FANPICO_VERSION);
printf(",%s%s\n", FANPICO_VERSION, FANPICO_BUILD_TAG);

return 0;
}
Expand Down Expand Up @@ -354,9 +354,10 @@ int cmd_version(const char *cmd, const char *args, int query, struct prev_cmd_t
if (cmd && !query)
return 1;

printf("FanPico-%s v%s (%s; %s; SDK v%s; %s)\n\n",
printf("FanPico-%s v%s%s (%s; %s; SDK v%s; %s)\n\n",
FANPICO_MODEL,
FANPICO_VERSION,
FANPICO_BUILD_TAG,
__DATE__,
PICO_CMAKE_BUILD_TYPE,
PICO_SDK_VERSION_STRING,
Expand Down
10 changes: 6 additions & 4 deletions src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
#define FANPICO_VERSION_MAJOR "@fanpico_VERSION_MAJOR@"
#define FANPICO_VERSION_MINOR "@fanpico_VERSION_MINOR@"


#include "boards/@[email protected]"
#define FANPICO_BOARD "@FANPICO_BOARD@"
#define FANPICO_BOARD "@FANPICO_BOARD@"
#define FANPICO_DEFAULT_CONFIG "boards/@[email protected]"

#define FANPICO_DEFAULT_CONFIG "boards/@[email protected]"
#define FANPICO_CUSTOM_THEME @FANPICO_CUSTOM_THEME@
#define FANPICO_CUSTOM_LOGO @FANPICO_CUSTOM_LOGO@

#define FANPICO_CUSTOM_THEME @FANPICO_CUSTOM_THEME@
#define FANPICO_CUSTOM_LOGO @FANPICO_CUSTOM_LOGO@
#define FANPICO_BUILD_TAG "@FANPICO_BUILD@"

#include "fanpico-compile.h"

Expand Down
3 changes: 2 additions & 1 deletion src/display_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ void draw_fields(const struct fanpico_state *state, const struct fanpico_config
case DATE_TIME:
if (rtc_get_tm(&t)) {
snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d",
t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec);
t.tm_year + 1900, t.tm_mon + 1, t.tm_mday,
t.tm_hour, t.tm_min, t.tm_sec);
}
break;
case DATE:
Expand Down
1 change: 1 addition & 0 deletions src/display_oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ void oled_display_init()
int y_o = (oled_height > 64 ? 4 : 0);
oledWriteString(&oled, 0, 15, y_o + 1, "FanPico-" FANPICO_MODEL, FONT_8x8, 0, 1);
oledWriteString(&oled, 0, 40, y_o + 3, "v" FANPICO_VERSION, FONT_8x8, 0, 1);
oledWriteString(&oled, 0, 40, y_o + 4, " " FANPICO_BUILD_TAG, FONT_8x8, 0, 1);
oledWriteString(&oled, 0, 20, y_o + 6, "Initializing...", FONT_6x8, 0, 1);

oled_found = 1;
Expand Down
6 changes: 3 additions & 3 deletions src/fanpico.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ void update_persistent_memory()

void boot_reason()
{
// printf(" CHIP_RESET: %08lx\n", vreg_and_chip_reset_hw->chip_reset);
#if PICO_RP2040
printf(" CHIP_RESET: %08lx\n", vreg_and_chip_reset_hw->chip_reset);
#endif
printf("WATCHDOG_REASON: %08lx\n", watchdog_hw->reason);
}

Expand All @@ -128,8 +130,6 @@ static void setup()
char buf[32];
int i = 0;

//rtc_init();
//aon_timer_start_with_timeofday();

stdio_usb_init();
/* Wait a while for USB Serial to connect... */
Expand Down

0 comments on commit f5502c3

Please sign in to comment.