From 6b901a57b685bf458c195ed1cca590741213d8e3 Mon Sep 17 00:00:00 2001 From: Anol Paisal Date: Mon, 5 Jul 2021 21:45:29 +0700 Subject: [PATCH] Update date from GPS to System time --- .../periodic-uplink-lpp/SKiM980A/main.c | 18 +- src/boards/SKiM980A/board.c | 92 +++++++-- src/boards/SKiM980A/display-board.c | 2 +- src/boards/SKiM980A/gps-board.c | 8 +- src/display/GUI/GUI_Paint.c | 175 +++++++++--------- src/display/GUI/GUI_Paint.h | 18 +- 6 files changed, 190 insertions(+), 123 deletions(-) diff --git a/src/apps/LoRaMac/periodic-uplink-lpp/SKiM980A/main.c b/src/apps/LoRaMac/periodic-uplink-lpp/SKiM980A/main.c index 095d1199e..052664329 100644 --- a/src/apps/LoRaMac/periodic-uplink-lpp/SKiM980A/main.c +++ b/src/apps/LoRaMac/periodic-uplink-lpp/SKiM980A/main.c @@ -318,6 +318,7 @@ int main( void ) #if ( USE_OLED == 1) DisplayProcess(); #endif + while( 1 ) { #if ( USE_GPS == 0) @@ -482,20 +483,23 @@ static void PrepareTxFrame( void ) CayenneLppReset( ); - uint8_t potiPercentage = 0; - uint16_t vdd = 0; + // uint8_t potiPercentage = 0; + // uint16_t vdd = 0; + float lt, ln, m; // Read the current potentiometer setting in percent - potiPercentage = BoardGetPotiLevel( ); + // potiPercentage = BoardGetPotiLevel( ); // Read the current voltage level BoardGetBatteryLevel( ); // Updates the value returned by BoardGetBatteryVoltage( ) function. - vdd = BoardGetBatteryVoltage( ); - + // vdd = BoardGetBatteryVoltage( ); + GpsGetLatestGpsPositionDouble((double*) <, (double*) &ln); + m = (float) GpsGetLatestGpsAltitude(); CayenneLppAddDigitalInput( channel++, AppLedStateOn ); CayenneLppAddAnalogInput( channel++, BoardGetBatteryLevel( ) * 100 / 254 ); - CayenneLppAddAnalogInput( channel++, potiPercentage ); - CayenneLppAddAnalogInput( channel++, vdd ); + // CayenneLppAddAnalogInput( channel++, potiPercentage ); + // CayenneLppAddAnalogInput( channel++, vdd ); + CayenneLppAddGps( channel++, lt, ln, m); CayenneLppCopy( AppData.Buffer ); AppData.BufferSize = CayenneLppGetSize( ); diff --git a/src/boards/SKiM980A/board.c b/src/boards/SKiM980A/board.c index b67e72344..3db25a01f 100644 --- a/src/boards/SKiM980A/board.c +++ b/src/boards/SKiM980A/board.c @@ -40,6 +40,7 @@ #endif #if ( USE_OLED == 1 ) #include +#include #include "systime.h" #include "display-board.h" PAINT_TIME sPaint_time = { @@ -165,11 +166,6 @@ void BoardCriticalSectionEnd( uint32_t *mask ) void BoardInitPeriph( void ) { -#if ( USE_GPS == 1 ) - // Init GPS - GpsInit( ); -#endif - #if ( USE_OLED == 1 ) DisplayInit(); @@ -214,7 +210,6 @@ void BoardInitMcu( void ) // Configure your terminal for 8 Bits data (7 data bit + 1 parity bit), no parity and no flow ctrl UartInit( &Uart1, UART_1, UART_TX, UART_RX ); UartConfig( &Uart1, RX_TX, 921600, UART_8_BIT, UART_1_STOP_BIT, NO_PARITY, NO_FLOW_CTRL ); - #endif RtcInit( ); @@ -227,6 +222,9 @@ void BoardInitMcu( void ) GpioWrite( &Led2, 0 ); GpioWrite( &Led3, 0 ); GpioWrite( &Led4, 0 ); +#else + // Init GPS + GpsInit( ); #endif BoardUnusedIoInit( ); if( GetBoardPowerSource( ) == BATTERY_POWER ) @@ -272,9 +270,9 @@ void BoardResetMcu( void ) void BoardDeInitMcu( void ) { Gpio_t ioPin; -#if ( USE_GPS == 0 ) + AdcDeInit( &Adc ); -#endif + SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); @@ -305,27 +303,81 @@ void BoardGetUniqueId( uint8_t *id ) #if ( USE_OLED == 1 ) void BoardDisplayShow( void ) { - DisplayClear(); + CRITICAL_SECTION_BEGIN( ); + // DisplayInitReg(); + // DisplayOn(); + + Paint_Clear(BLACK); + DisplayUpdate(); + //paint LoRa information + char buf[24]; + double lt, ln; + struct tm localtime; + SysTime_t curTime = { .Seconds = 0, .SubSeconds = 0 }; + curTime = SysTimeGet( ); sPaint_gps.alt = GpsGetLatestGpsAltitude(); sPaint_gps.fix = GpsHasFix(); - GpsGetLatestGpsPositionBinary(&sPaint_gps.lat, &sPaint_gps.lon); + + if(sPaint_gps.fix){ + + strncpy(buf, NmeaGpsData.NmeaUtcTime, 2); + localtime.tm_hour = sPaint_time.Hour = atoi(buf); + strncpy(buf,NmeaGpsData.NmeaUtcTime + 2, 2); + localtime.tm_min = sPaint_time.Min = atoi(buf); + strncpy(buf,NmeaGpsData.NmeaUtcTime + 4, 2); + localtime.tm_sec = sPaint_time.Sec = atoi(buf); + + strncpy(buf, NmeaGpsData.NmeaDate, 2); + localtime.tm_mday = sPaint_time.Day = atoi(buf); + strncpy(buf,NmeaGpsData.NmeaDate + 2, 2); + localtime.tm_mon = sPaint_time.Month = atoi(buf); + strncpy(buf,NmeaGpsData.NmeaDate + 4, 2); + sPaint_time.Year = atoi(buf); + localtime.tm_year = (2000 + sPaint_time.Year) - 1900; + curTime.Seconds = SysTimeMkTime(&localtime); + SysTimeSet(curTime); + } + else + { + SysTimeLocalTime(curTime.Seconds, &localtime ); + sPaint_time.Hour = localtime.tm_hour; + sPaint_time.Min = localtime.tm_min; + sPaint_time.Sec = localtime.tm_sec; + sPaint_time.Day = localtime.tm_mday; + sPaint_time.Month = localtime.tm_mon; + sPaint_time.Year = (localtime.tm_year + 1900) % 100; + } - Paint_DrawGps(5, 1, &sPaint_gps, &Font8, WHITE, BLACK); + GpsGetLatestGpsPositionDouble(<, &ln); + sPaint_gps.lat = (int32_t)(lt * 100000); + sPaint_gps.lon = (int32_t)(ln * 100000); //gps infomation - Paint_DrawLoRa(5, 20, &sPaint_lora, &Font8, WHITE, BLACK); - + sprintf(buf, "LT:%d.%d LN:%d.%d", (int) (sPaint_gps.lat / 100000), (int)(sPaint_gps.lat % 100000), \ + (int)(sPaint_gps.lon / 100000), (int)(sPaint_gps.lon % 100000)); + Paint_DrawString_EN(5, 1, buf, &Font8, BLACK, WHITE); + sprintf(buf, "AT:%d F:%d", sPaint_gps.alt, sPaint_gps.fix); + Paint_DrawString_EN(5, 1 + Font8.Height, buf, &Font8, BLACK, WHITE); + + sprintf(buf, "UL->PW:%d CL:%c | DR:%d", (16 - sPaint_lora.pwr), sPaint_lora.class, sPaint_lora.dr); + Paint_DrawString_EN(5, 20, buf, &Font8, BLACK, WHITE); + sprintf(buf, "DL->RS:%d LS:%d | PT:%d", sPaint_lora.rssi, sPaint_lora.lsnr, sPaint_lora.port); + Paint_DrawString_EN(5, 20 + Font8.Height, buf, &Font8, BLACK, WHITE); + sprintf(buf, "UC:%8lu DC:%8lu", sPaint_lora.ulFcnt, sPaint_lora.dlFcnt); + Paint_DrawString_EN(5, 20 + Font8.Height * 2, buf, &Font8, BLACK, WHITE); + if (sPaint_lora.status != NULL) { + sprintf(buf, "S:%s", sPaint_lora.status); + Paint_DrawString_EN(5, 20 + Font8.Height * 3, buf, &Font8, BLACK, WHITE); + } // local time utc - uint32_t calendarvalue = RtcGetCalendarTime(NULL); - struct tm localtime; - SysTimeLocalTime(calendarvalue, &localtime ); - sPaint_time.Hour = localtime.tm_hour; - sPaint_time.Min = localtime.tm_min; - sPaint_time.Sec = localtime.tm_sec; - Paint_DrawTime(52, 52, &sPaint_time, &Font16, BLACK, WHITE); + sprintf(buf,"%02d:%02d:%02dUTC-%02d/%02d/%02d", sPaint_time.Hour, sPaint_time.Min, sPaint_time.Sec, \ + sPaint_time.Day, sPaint_time.Month, (int) sPaint_time.Year); + Paint_DrawString_EN(20 , 52, buf, &Font8, BLACK, WHITE); DisplayUpdate(); + + CRITICAL_SECTION_END( ); } #endif diff --git a/src/boards/SKiM980A/display-board.c b/src/boards/SKiM980A/display-board.c index 5397a09fd..caad5947a 100644 --- a/src/boards/SKiM980A/display-board.c +++ b/src/boards/SKiM980A/display-board.c @@ -38,7 +38,7 @@ uint8_t m_column = 0; uint8_t m_page = 0; uint8_t m_seg_offset = 0; #define Imagesize 1024 //(((OLED_WIDTH%8==0)? (OLED_WIDTH/8): (OLED_WIDTH/8+1)) * OLED_HEIGHT) -uint8_t BlackImage[Imagesize]; +volatile uint8_t BlackImage[Imagesize]; extern PAINT Paint; static bool wkup = 0; /******************************************************************************** diff --git a/src/boards/SKiM980A/gps-board.c b/src/boards/SKiM980A/gps-board.c index bfb2a2abd..0c161bbb6 100644 --- a/src/boards/SKiM980A/gps-board.c +++ b/src/boards/SKiM980A/gps-board.c @@ -117,6 +117,8 @@ void GpsMcuStart( void ) // { GpioWrite( &GpsPowerEn, 1 ); // power up the GPS // } + UartInit( &Uart1, UART_1, GPS_UART_TX, GPS_UART_RX ); + UartConfig( &Uart1, RX_ONLY, 9600, UART_8_BIT, UART_1_STOP_BIT, NO_PARITY, NO_FLOW_CTRL ); } void GpsMcuStop( void ) @@ -155,9 +157,9 @@ void GpsMcuIrqNotify( UartNotifyId_t id ) { NmeaString[NmeaStringSize++] = '\0'; GpsParseGpsData( ( int8_t* )NmeaString, NmeaStringSize ); - UartDeInit( &Uart1 ); - // Enables lowest power modes - LpmSetStopMode( LPM_GPS_ID , LPM_ENABLE ); + // UartDeInit( &Uart1 ); + // // Enables lowest power modes + // LpmSetStopMode( LPM_GPS_ID , LPM_ENABLE ); } } } diff --git a/src/display/GUI/GUI_Paint.c b/src/display/GUI/GUI_Paint.c index 0500b61ff..4fa3189aa 100644 --- a/src/display/GUI/GUI_Paint.c +++ b/src/display/GUI/GUI_Paint.c @@ -456,7 +456,7 @@ function: Show English characters Color_Background : Select the background color ******************************************************************************/ void Paint_DrawChar(uint32_t Xpoint, uint32_t Ypoint, const char Acsii_Char, - sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background) + const sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background) { uint32_t Page, Column; @@ -505,7 +505,7 @@ function: Display the string Color_Background : Select the background color ******************************************************************************/ void Paint_DrawString_EN(uint32_t Xstart, uint32_t Ystart, const char * pString, - sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background) + const sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background) { uint32_t Xpoint = Xstart; uint32_t Ypoint = Ystart; @@ -549,7 +549,7 @@ function: Display the string Color_Foreground : Select the foreground color Color_Background : Select the background color ******************************************************************************/ -void Paint_DrawString_CN(uint32_t Xstart, uint32_t Ystart, const char * pString, cFONT* font, +void Paint_DrawString_CN(uint32_t Xstart, uint32_t Ystart, const char * pString, const cFONT* font, uint32_t Color_Foreground, uint32_t Color_Background) { const char* p_text = pString; @@ -695,89 +695,98 @@ void Paint_DrawNum(uint32_t Xpoint, uint32_t Ypoint, double Nummber, Paint_DrawString_EN(Xpoint, Ypoint, (const char*)pStr, Font, Color_Background, Color_Foreground); } -/****************************************************************************** -function: Display time -parameter: - Xstart :X coordinate - Ystart : Y coordinate - pTime : Time-related structures - Font :A structure pointer that displays a character size - Color_Foreground : Select the foreground color - Color_Background : Select the background color -******************************************************************************/ -void Paint_DrawTime(uint32_t Xstart, uint32_t Ystart, PAINT_TIME *pTime, sFONT* Font, - uint32_t Color_Foreground, uint32_t Color_Background) -{ - uint8_t value[10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; - - uint32_t Dx = Font->Width; - - //Write data into the cache - Paint_DrawChar(Xstart , Ystart, value[pTime->Hour / 10], Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx , Ystart, value[pTime->Hour % 10], Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx + Dx / 4 + Dx / 2 , Ystart, ':' , Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx * 2 + Dx / 2 , Ystart, value[pTime->Min / 10] , Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx * 3 + Dx / 2 , Ystart, value[pTime->Min % 10] , Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx * 4 + Dx / 2 - Dx / 4, Ystart, ':' , Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx * 5 , Ystart, value[pTime->Sec / 10] , Font, Color_Background, Color_Foreground); - Paint_DrawChar(Xstart + Dx * 6 , Ystart, value[pTime->Sec % 10] , Font, Color_Background, Color_Foreground); +// /****************************************************************************** +// function: Display time +// parameter: +// Xstart :X coordinate +// Ystart : Y coordinate +// pTime : Time-related structures +// Font :A structure pointer that displays a character size +// Color_Foreground : Select the foreground color +// Color_Background : Select the background color +// ******************************************************************************/ +// void Paint_DrawTime(uint32_t Xstart, uint32_t Ystart, const PAINT_TIME *pTime, const sFONT* Font, +// uint32_t Color_Foreground, uint32_t Color_Background) +// { +// // uint8_t value[10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; + +// // uint32_t Dx = Font->Width; + +// char buf[22]; +// sprintf(buf,"%02d:%02d:%02dUTC-%02d/%02d/%02d", pTime->Hour, pTime->Min, pTime->Sec, pTime->Day, pTime->Month, (int) pTime->Year); +// Paint_DrawString_EN(Xstart , Ystart, buf, Font, Color_Background, Color_Foreground); +// //Write data into the cache +// // Paint_DrawChar(Xstart , Ystart, value[pTime->Hour / 10], Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx , Ystart, value[pTime->Hour % 10], Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx + Dx / 4 + Dx / 2 , Ystart, ':' , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 2 + Dx / 2 , Ystart, value[pTime->Min / 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 3 + Dx / 2 , Ystart, value[pTime->Min % 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 4 + Dx / 2 - Dx / 4, Ystart, ':' , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 5 , Ystart, value[pTime->Sec / 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 6 , Ystart, value[pTime->Sec % 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 7 , Ystart, value[pTime->Day / 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 8 , Ystart, value[pTime->Day % 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 9 , Ystart, value[pTime->Month / 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 10 , Ystart, value[pTime->Month % 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 11 , Ystart, value[pTime->Year / 10] , Font, Color_Background, Color_Foreground); +// // Paint_DrawChar(Xstart + Dx * 12 , Ystart, value[pTime->Year % 10] , Font, Color_Background, Color_Foreground); -} - -/****************************************************************************** -function: Display GPS -parameter: - Xstart :X coordinate - Ystart : Y coordinate - pGps : Gps-related structures - Font :A structure pointer that displays a character size - Color_Foreground : Select the foreground color - Color_Background : Select the background color -******************************************************************************/ -void Paint_DrawGps(uint32_t Xstart, uint32_t Ystart, PAINT_GPS *pGps, sFONT* Font, - uint32_t Color_Foreground, uint32_t Color_Background) -{ - char buf[24]; - - //Write data into the cache - sprintf(buf, "LT:%d.%d LN:%d.%d", (int) (pGps->lat / 1000), (int)(pGps->lat % 1000), \ - (int)(pGps->lon / 1000), (int)(pGps->lon % 1000)); - Paint_DrawString_EN(Xstart, Ystart, buf, Font, Color_Background, Color_Foreground); +// } + +// /****************************************************************************** +// function: Display GPS +// parameter: +// Xstart :X coordinate +// Ystart : Y coordinate +// pGps : Gps-related structures +// Font :A structure pointer that displays a character size +// Color_Foreground : Select the foreground color +// Color_Background : Select the background color +// ******************************************************************************/ +// void Paint_DrawGps(uint32_t Xstart, uint32_t Ystart, const PAINT_GPS *pGps, const sFONT* Font, +// uint32_t Color_Foreground, uint32_t Color_Background) +// { +// char buf[24]; + +// //Write data into the cache +// sprintf(buf, "LT:%d.%d LN:%d.%d", (int) (pGps->lat / 100000), (int)(pGps->lat % 100000), \ +// (int)(pGps->lon / 100000), (int)(pGps->lon % 100000)); +// Paint_DrawString_EN(Xstart, Ystart, buf, Font, Color_Background, Color_Foreground); - sprintf(buf, "AT:%d F:%d", pGps->alt, pGps->fix); - Paint_DrawString_EN(Xstart, Ystart + 10, buf, Font, Color_Background, Color_Foreground); -} - -/****************************************************************************** -function: Display LoRa -parameter: - Xstart :X coordinate - Ystart : Y coordinate - pLoRa : LoRa-related structures - Font :A structure pointer that displays a character size - Color_Foreground : Select the foreground color - Color_Background : Select the background color -******************************************************************************/ -void Paint_DrawLoRa(uint32_t Xstart, uint32_t Ystart, PAINT_LoRa *pLoRa, sFONT* Font, - uint32_t Color_Foreground, uint32_t Color_Background) -{ - char buf[24]; - - int dy = Font->Height; +// sprintf(buf, "AT:%d F:%d", pGps->alt, pGps->fix); +// Paint_DrawString_EN(Xstart, Ystart + 10, buf, Font, Color_Background, Color_Foreground); +// } + +// /****************************************************************************** +// function: Display LoRa +// parameter: +// Xstart :X coordinate +// Ystart : Y coordinate +// pLoRa : LoRa-related structures +// Font :A structure pointer that displays a character size +// Color_Foreground : Select the foreground color +// Color_Background : Select the background color +// ******************************************************************************/ +// void Paint_DrawLoRa(uint32_t Xstart, uint32_t Ystart, const PAINT_LoRa *pLoRa, const sFONT* Font, +// uint32_t Color_Foreground, uint32_t Color_Background) +// { +// char buf[24]; + +// int dy = Font->Height; - //Write data into the cache - - sprintf(buf, "UL->PW:%d CL:%c | DR:%d", pLoRa->pwr, pLoRa->class, pLoRa->dr); - Paint_DrawString_EN(Xstart, Ystart, buf, Font, Color_Background, Color_Foreground); - sprintf(buf, "DL->RS:%d LS:%d | PR:%d", pLoRa->rssi, pLoRa->lsnr, sPaint_lora.port); - Paint_DrawString_EN(Xstart, Ystart + dy, buf, Font, Color_Background, Color_Foreground); - sprintf(buf, "UC:%8lu DC:%8lu", pLoRa->ulFcnt, pLoRa->dlFcnt); - Paint_DrawString_EN(Xstart, Ystart + dy * 2, buf, Font, Color_Background, Color_Foreground); - if (pLoRa->status != NULL) { - sprintf(buf, "S:%s", pLoRa->status); - Paint_DrawString_EN(Xstart, Ystart + dy * 3, buf, Font, Color_Background, Color_Foreground); - } -} +// //Write data into the cache + +// sprintf(buf, "UL->PW:%d CL:%c | DR:%d", (16 - pLoRa->pwr), pLoRa->class, pLoRa->dr); +// Paint_DrawString_EN(Xstart, Ystart, buf, Font, Color_Background, Color_Foreground); +// sprintf(buf, "DL->RS:%d LS:%d | PT:%d", pLoRa->rssi, pLoRa->lsnr, sPaint_lora.port); +// Paint_DrawString_EN(Xstart, Ystart + dy, buf, Font, Color_Background, Color_Foreground); +// sprintf(buf, "UC:%8lu DC:%8lu", pLoRa->ulFcnt, pLoRa->dlFcnt); +// Paint_DrawString_EN(Xstart, Ystart + dy * 2, buf, Font, Color_Background, Color_Foreground); +// if (pLoRa->status != NULL) { +// sprintf(buf, "S:%s", pLoRa->status); +// Paint_DrawString_EN(Xstart, Ystart + dy * 3, buf, Font, Color_Background, Color_Foreground); +// } +// } void Paint_DrawImage(const unsigned char *image, uint32_t xStart, uint32_t yStart, uint32_t W_Image, uint32_t H_Image) { diff --git a/src/display/GUI/GUI_Paint.h b/src/display/GUI/GUI_Paint.h index df572432f..8ed4bc300 100644 --- a/src/display/GUI/GUI_Paint.h +++ b/src/display/GUI/GUI_Paint.h @@ -122,7 +122,7 @@ extern PAINT_TIME sPaint_time; typedef struct { int32_t lat; //decimal degree int32_t lon; //decimal degree - uint16_t alt; //m + int16_t alt; //m bool fix; //0: not fix, 1: fixed } PAINT_GPS; extern PAINT_GPS sPaint_gps; @@ -163,15 +163,15 @@ void Paint_DrawRectangle(uint32_t Xstart, uint32_t Ystart, uint32_t Xend, uint32 void Paint_DrawCircle(uint32_t X_Center, uint32_t Y_Center, uint32_t Radius, uint32_t Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill); //Display string -void Paint_DrawChar(uint32_t Xstart, uint32_t Ystart, const char Acsii_Char, sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); -void Paint_DrawString_EN(uint32_t Xstart, uint32_t Ystart, const char * pString, sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); -void Paint_DrawString_CN(uint32_t Xstart, uint32_t Ystart, const char * pString, cFONT* font, uint32_t Color_Foreground, uint32_t Color_Background); +void Paint_DrawChar(uint32_t Xstart, uint32_t Ystart, const char Acsii_Char,const sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); +void Paint_DrawString_EN(uint32_t Xstart, uint32_t Ystart, const char * pString, const sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); +void Paint_DrawString_CN(uint32_t Xstart, uint32_t Ystart, const char * pString, const cFONT* font, uint32_t Color_Foreground, uint32_t Color_Background); void Paint_DrawNum(uint32_t Xpoint, uint32_t Ypoint, double Nummber, sFONT* Font, uint32_t Digit,uint32_t Color_Foreground, uint32_t Color_Background); -void Paint_DrawTime(uint32_t Xstart, uint32_t Ystart, PAINT_TIME *pTime, sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); -void Paint_DrawGps(uint32_t Xstart, uint32_t Ystart, PAINT_GPS *pGps, sFONT* Font, - uint32_t Color_Foreground, uint32_t Color_Background); -void Paint_DrawLoRa(uint32_t Xstart, uint32_t Ystart, PAINT_LoRa *pLora, sFONT* Font, - uint32_t Color_Foreground, uint32_t Color_Background); +// void Paint_DrawTime(uint32_t Xstart, uint32_t Ystart, const PAINT_TIME *pTime, const sFONT* Font, uint32_t Color_Foreground, uint32_t Color_Background); +// void Paint_DrawGps(uint32_t Xstart, uint32_t Ystart, const PAINT_GPS *pGps, const sFONT* Font, +// uint32_t Color_Foreground, uint32_t Color_Background); +// void Paint_DrawLoRa(uint32_t Xstart, uint32_t Ystart, const PAINT_LoRa *pLora, const sFONT* Font, +// uint32_t Color_Foreground, uint32_t Color_Background); //pic void Paint_DrawBitMap(const unsigned char* image_buffer); void Paint_DrawBitMap_Block(const unsigned char* image_buffer, uint8_t Region);