mirror of
https://github.com/Lurkars/esp-ena.git
synced 2024-11-25 03:06:11 +01:00
fix st7735(s) color, fixed last count
This commit is contained in:
parent
196bf5f560
commit
45444bb8c5
@ -18,8 +18,8 @@
|
||||
#define M5_ST7735S_INTERFACE_OFFSETX 16
|
||||
#define M5_ST7735S_INTERFACE_OFFSETY 8
|
||||
|
||||
#define M5_ST7735S_LANDSCAPE_FLIPPED 0x60
|
||||
#define M5_ST7735S_LANDSCAPE 0xA0
|
||||
#define M5_ST7735S_LANDSCAPE_FLIPPED 0x68
|
||||
#define M5_ST7735S_LANDSCAPE 0xA8
|
||||
|
||||
#define SPI_COMMAND_MODE 0
|
||||
#define SPI_DATA_MODE 1
|
||||
|
@ -19,8 +19,8 @@
|
||||
#define TTGO_T_WRISTBAND_INTERFACE_OFFSETX 16
|
||||
#define TTGO_T_WRISTBAND_INTERFACE_OFFSETY 8
|
||||
|
||||
#define TTGO_T_WRISTBAND_LANDSCAPE_FLIPPED 0x60
|
||||
#define TTGO_T_WRISTBAND_LANDSCAPE 0xA0
|
||||
#define TTGO_T_WRISTBAND_LANDSCAPE_FLIPPED 0x68
|
||||
#define TTGO_T_WRISTBAND_LANDSCAPE 0xA8
|
||||
|
||||
#define SPI_COMMAND_MODE 0
|
||||
#define SPI_DATA_MODE 1
|
||||
|
@ -108,17 +108,17 @@ void interface_debug_task(void *pvParameter)
|
||||
#if defined(CONFIG_ENA_INTERFACE_M5STICKC) || defined(CONFIG_ENA_INTERFACE_M5STICKC_PLUS) || defined(CONFIG_ENA_INTERFACE_TTGO_T_WRISTBAND)
|
||||
char data_chars[32];
|
||||
sprintf(data_chars, "acc x:%3.2f", ax);
|
||||
display_text_line(data_chars, 2, false);
|
||||
display_text_line(data_chars, 1, false);
|
||||
sprintf(data_chars, "acc y:%3.2f", ay);
|
||||
display_text_line(data_chars, 3, false);
|
||||
display_text_line(data_chars, 2, false);
|
||||
sprintf(data_chars, "acc z:%3.2f", az);
|
||||
display_text_line(data_chars, 4, false);
|
||||
display_text_line(data_chars, 3, false);
|
||||
sprintf(data_chars, "gyr x:%3.2f", gx);
|
||||
display_text_line(data_chars, 5, false);
|
||||
display_text_line(data_chars, 4, false);
|
||||
sprintf(data_chars, "gyr y:%3.2f", gy);
|
||||
display_text_line(data_chars, 6, false);
|
||||
display_text_line(data_chars, 5, false);
|
||||
sprintf(data_chars, "gyr z:%3.2f", gz);
|
||||
display_text_line(data_chars, 7, false);
|
||||
display_text_line(data_chars, 6, false);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -96,11 +96,10 @@ void interface_info_display(void)
|
||||
time_t current_timstamp;
|
||||
time(¤t_timstamp);
|
||||
|
||||
int max = ena_expore_check_find_min((uint32_t)current_timstamp);
|
||||
int min = ena_expore_check_find_min((uint32_t)current_timstamp - 60 * 30);
|
||||
int last30 = max - min;
|
||||
int last30 = num - min;
|
||||
|
||||
if (last30 > 0)
|
||||
if (last30 >= 0)
|
||||
{
|
||||
sprintf(data_chars, "%d", last30);
|
||||
display_text_line_column(data_chars, 3, interface_info_num_offset(last30), false);
|
||||
|
Loading…
Reference in New Issue
Block a user