EU1KY AA
mainwnd.c File Reference
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "font.h"
#include "touch.h"
#include "mainwnd.h"
#include "textbox.h"
#include "config.h"
#include "fftwnd.h"
#include "generator.h"
#include "measurement.h"
#include "oslcal.h"
#include "panvswr2.h"
#include "panfreq.h"
#include "main.h"
#include "usbd_storage.h"
#include "ff_gen_drv.h"
#include "sd_diskio.h"
#include "crash.h"
#include "dsp.h"
#include "gen.h"
#include "aauart.h"
#include "build_timestamp.h"
#include "tdr.h"
#include "screenshot.h"
#include "spectr.h"
#include "stm32_ub_adc3_single.h"
#include "DS3231.h"

Macros

#define M_BGCOLOR   LCD_RGB(0,0,64)
 
#define M_FGCOLOR   LCD_RGB(255,255,0)
 
#define COL1   10
 
#define COL2   230
 
#define RXB_SIZE   64
 
#define TBX0   190
 
#define Fieldw1   70
 
#define TBX1   300
 
#define Fieldw2   60
 
#define FieldH   36
 
#define TBY   90
 
#define XXa   2
 
#define COL3   380
 

Functions

void Sleep (uint32_t)
 
static void Exit1 (void)
 
void Voltage (void)
 
void InitVoltage (void)
 
static void MenuTools (void)
 
static void MenuSettings (void)
 
static void MenuCalibration (void)
 
static void Colours (void)
 
static void USBD_Proc ()
 
static char * _trim (char *str)
 
static void Wait_proc (void)
 
static int PROTOCOL_RxCmd (void)
 
static void PROTOCOL_Reset (void)
 
static void PROTOCOL_Handler (void)
 
 void (Delete(void))
 
 void (ShowP(void))
 
 void (Next(void))
 
 void (NextPage(void))
 
 void (Prev(void))
 
void Exit (void)
 
void Reload_Proc (void)
 
void MenuData_PC (void)
 
void MEASUREMENT_Menu (void)
 
uint8_t TestDate (void)
 
void SetInternTime (uint32_t timx)
 
void NextDay (void)
 
uint32_t GetInternTime (uint8_t *secondsx)
 
static void DateTime (void)
 
void MainWnd (void)
 
void SetColours (void)
 
static void Daylight (void)
 
static void Inhouse (void)
 
static void Fatlines (void)
 
static void Thinlines (void)
 
static void BeepOn (void)
 
static void BeepOff (void)
 
void minus10 (void)
 
void minus100 (void)
 
void minus1000 (void)
 
void plus10 (void)
 
void plus100 (void)
 
void plus1000 (void)
 
void VoltCase1 (void)
 
void VoltCase2 (void)
 
static void Exit3 (void)
 
void ShowVoltage (void)
 
void VoltOff (void)
 
void SetMax (void)
 
static void MenuAccu (void)
 
uint32_t NumKeypad (uint32_t initial, uint32_t min_value, uint32_t max_value, const char *header_text)
 
bool TestRTCpresent (void)
 
static void MenuRTC (void)
 
uint32_t TestLoopOsci (uint32_t f_begin, uint32_t f_stop)
 
void hit_save1 (void)
 
void hit_ex1 (void)
 
void OsciTest (void)
 

Variables

static uint32_t date
 
static uint32_t time
 
uint32_t RTCpresent
 
static TEXTBOX_CTX_t main_ctx
 
static TEXTBOX_t hbMeas
 
static TEXTBOX_t hbTools
 
static TEXTBOX_t hbGen
 
static TEXTBOX_t hbSettings
 
static TEXTBOX_t hbDatPc
 
static TEXTBOX_t hbTimestamp
 
static TEXTBOX_CTX_t main_ctx1
 
static TEXTBOX_t hbSingle
 
static TEXTBOX_t hbPan
 
static TEXTBOX_t hbMulti
 
static TEXTBOX_t hbTun
 
static TEXTBOX_t hbMain
 
static TEXTBOX_CTX_t menu1_ctx
 
static TEXTBOX_CTX_t fctx1
 
static TEXTBOX_t hbPict
 
static TEXTBOX_t hbUSB
 
static TEXTBOX_t hbMain1
 
static TEXTBOX_CTX_t menu2_ctx
 
static TEXTBOX_CTX_t menu3_ctx
 
static TEXTBOX_CTX_t menuRTC_ctx
 
static TEXTBOX_CTX_t osci_ctx
 
static USBD_HandleTypeDef USBD_Device
 
char SDPath [4]
 
FATFS SDFatFs
 
uint8_t second
 
static FILINFO fno
 
static int voltage
 
static bool rqExit1
 
static char rxstr [RXB_SIZE+1]
 
static uint32_t rx_ctr = 0
 
static char * rxstr_p
 
static uint32_t _fCenter = 10000000ul
 
static uint32_t _fSweep = 100000ul
 
static const char * ERR = "ERROR\r"
 
static const char * OK = "OK\r"
 
static TCHAR fileNames [13][13]
 
static uint16_t Pointer
 
static uint16_t Line
 
static uint16_t Pmax
 
static uint8_t EndFlag
 
static uint16_t rqExit
 
static uint16_t rqExitR
 
static uint16_t newLoad
 
static uint16_t FileNo
 
volatile int Page
 
static const TEXTBOX_t tb_reload []
 
static uint8_t second1
 
static const TEXTBOX_t tb_col []
 
static const TEXTBOX_t tb_menuTools []
 
static int VoltCase
 
static int Volt_max_Display
 
static int Volt_min_Display
 
static int Volt_max_Factor
 
static uint32_t color1
 
static uint32_t color2
 
int BattVoltage
 
int Batt
 
float VoltFloat
 
float percent
 
int cntr
 
int CountMax
 
char text1 [25]
 
static int rqExit3
 
static const TEXTBOX_t volt_menu []
 
static uint32_t date2
 
static uint32_t time2
 
static uint32_t rtctime
 
static const TEXTBOX_t tb_menu1 []
 
static uint32_t SImax
 
static uint32_t fmax
 
static uint32_t f5
 
char str1 [60]
 
uint32_t SI5351_MAX_FREQ [] ={160000000,200000000,260000000,270000000,280000000,290000000,300000000}
 
TEXTBOX_t hbEx1
 
TEXTBOX_t hbSave1
 
static const TEXTBOX_t tb_menu2 []
 

Macro Definition Documentation

#define COL1   10
#define COL2   230
#define COL3   380
#define FieldH   36
#define Fieldw1   70
#define Fieldw2   60
#define M_BGCOLOR   LCD_RGB(0,0,64)
#define M_FGCOLOR   LCD_RGB(255,255,0)
#define RXB_SIZE   64
#define TBX0   190
#define TBX1   300
#define TBY   90
#define XXa   2

Function Documentation

static char* _trim ( char *  str)
static
static void BeepOff ( void  )
static
static void BeepOn ( void  )
static
static void Colours ( void  )
static
static void DateTime ( void  )
static
static void Daylight ( void  )
static
void Exit ( void  )
static void Exit1 ( void  )
static
static void Exit3 ( void  )
static
static void Fatlines ( void  )
static
uint32_t GetInternTime ( uint8_t *  secondsx)
void hit_ex1 ( void  )
void hit_save1 ( void  )
static void Inhouse ( void  )
static
void InitVoltage ( void  )
void MainWnd ( void  )
void MEASUREMENT_Menu ( void  )
static void MenuAccu ( void  )
static
static void MenuCalibration ( void  )
static
void MenuData_PC ( void  )
static void MenuRTC ( void  )
static
static void MenuSettings ( void  )
static
static void MenuTools ( void  )
static
void minus10 ( void  )
void minus100 ( void  )
void minus1000 ( void  )
void NextDay ( void  )
uint32_t NumKeypad ( uint32_t  initial,
uint32_t  min_value,
uint32_t  max_value,
const char *  header_text 
)
void OsciTest ( void  )
void plus10 ( void  )
void plus100 ( void  )
void plus1000 ( void  )
static void PROTOCOL_Handler ( void  )
static
static void PROTOCOL_Reset ( void  )
static
static int PROTOCOL_RxCmd ( void  )
static
void Reload_Proc ( void  )
void SetColours ( void  )
void SetInternTime ( uint32_t  timx)
void SetMax ( void  )
void ShowVoltage ( void  )
void Sleep ( uint32_t  )
uint8_t TestDate ( void  )
uint32_t TestLoopOsci ( uint32_t  f_begin,
uint32_t  f_stop 
)
bool TestRTCpresent ( void  )
static void Thinlines ( void  )
static
static void USBD_Proc ( )
static
void ( Delete(void)  )
void ( ShowP(void)  )
void ( Next(void)  )
void ( NextPage(void)  )
void ( Prev(void)  )
void Voltage ( void  )
void VoltCase1 ( void  )
void VoltCase2 ( void  )
void VoltOff ( void  )
static void Wait_proc ( void  )
static

Variable Documentation

uint32_t _fCenter = 10000000ul
static
uint32_t _fSweep = 100000ul
static
int Batt
int BattVoltage
int cntr
uint32_t color1
static
uint32_t color2
static
int CountMax
uint32_t date
static
uint32_t date2
static
uint8_t EndFlag
static
const char* ERR = "ERROR\r"
static
uint32_t f5
static
TEXTBOX_CTX_t fctx1
static
TCHAR fileNames[13][13]
static
uint16_t FileNo
static
uint32_t fmax
static
FILINFO fno
static
TEXTBOX_t hbDatPc
static
TEXTBOX_t hbEx1
Initial value:
= (TEXTBOX_t){.x0 = 10, .y0 = 200, .text = " Cancel and exit ", .font = FONT_FRANBIG,
.fgcolor = LCD_BLUE, .bgcolor = LCD_YELLOW, .cb = hit_ex1 }
Definition: textbox.h:15
Definition: LCD.h:42
Definition: LCD.h:43
void hit_ex1(void)
Definition: mainwnd.c:1337
Definition: font.h:18
TEXTBOX_t hbGen
static
TEXTBOX_t hbMain
static
TEXTBOX_t hbMain1
static
TEXTBOX_t hbMeas
static
TEXTBOX_t hbMulti
static
TEXTBOX_t hbPan
static
TEXTBOX_t hbPict
static
TEXTBOX_t hbSave1
Initial value:
= (TEXTBOX_t){.x0 = 300, .y0 = 200, .text = " Save and exit ", .font = FONT_FRANBIG,
.fgcolor = LCD_RGB(128,128,128), .bgcolor = LCD_RGB(64,64,64), .cb = hit_save1 }
Definition: textbox.h:15
Definition: font.h:18
#define LCD_RGB(r, g, b)
Convert 24-bit RGB color to 888 format with macro.
Definition: LCD.h:29
void hit_save1(void)
Definition: mainwnd.c:1331
TEXTBOX_t hbSettings
static
TEXTBOX_t hbSingle
static
TEXTBOX_t hbTimestamp
static
TEXTBOX_t hbTools
static
TEXTBOX_t hbTun
static
TEXTBOX_t hbUSB
static
uint16_t Line
static
TEXTBOX_CTX_t main_ctx
static
TEXTBOX_CTX_t main_ctx1
static
TEXTBOX_CTX_t menu1_ctx
static
TEXTBOX_CTX_t menu2_ctx
static
TEXTBOX_CTX_t menu3_ctx
static
TEXTBOX_CTX_t menuRTC_ctx
static
uint16_t newLoad
static
const char* OK = "OK\r"
static
TEXTBOX_CTX_t osci_ctx
static
volatile int Page
float percent
uint16_t Pmax
static
uint16_t Pointer
static
uint16_t rqExit
static
bool rqExit1
static
int rqExit3
static
uint16_t rqExitR
static
uint32_t RTCpresent
uint32_t rtctime
static
uint32_t rx_ctr = 0
static
char rxstr[RXB_SIZE+1]
static
char* rxstr_p
static
FATFS SDFatFs
char SDPath[4]
uint8_t second
uint8_t second1
static
uint32_t SI5351_MAX_FREQ[] ={160000000,200000000,260000000,270000000,280000000,290000000,300000000}
uint32_t SImax
static
char str1[60]
const TEXTBOX_t tb_col[]
static
Initial value:
= {
(TEXTBOX_t){ .x0 = XXa, .y0 = 50, .text = "Daylight", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))Daylight, .cbparam = 1, .next = (void*)&tb_col[1] },
(TEXTBOX_t){ .x0 = XXa, .y0 = 100, .text = "Inhouse", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))Inhouse, .cbparam = 1, .next = (void*)&tb_col[2] },
(TEXTBOX_t){ .x0 = XXa, .y0 = 150, .text = "Fat Lines", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))Fatlines, .cbparam = 1, .next = (void*)&tb_col[3] },
(TEXTBOX_t){ .x0 = XXa, .y0 = 200, .text = "Thin Lines", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))Thinlines, .cbparam = 1, .next = (void*)&tb_col[4] },
(TEXTBOX_t){ .x0 = XXa+240, .y0 = 100, .text = "Beep On", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))BeepOn, .cbparam = 1, .next = (void*)&tb_col[5] },
(TEXTBOX_t){ .x0 = XXa+240, .y0 = 150, .text = "Beep Off", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = (void(*)(void))BeepOff, .cbparam = 1, .next = (void*)&tb_col[6] },
(TEXTBOX_t){ .x0 = 240, .y0 = 200, .text = " Exit ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = LCD_RED, .cb = (void(*)(void))Exit1, .cbparam = 1, },
}
Definition: textbox.h:15
static void BeepOff(void)
Definition: mainwnd.c:839
static void Fatlines(void)
Definition: mainwnd.c:817
static void Exit1(void)
Definition: mainwnd.c:846
#define M_FGCOLOR
Definition: mainwnd.c:89
static void Thinlines(void)
Definition: mainwnd.c:825
uint16_t x0
Definition: textbox.h:22
Definition: font.h:18
static const TEXTBOX_t tb_col[]
Definition: mainwnd.c:851
#define XXa
Definition: mainwnd.c:780
static void BeepOn(void)
Definition: mainwnd.c:832
static void Daylight(void)
Definition: mainwnd.c:806
Definition: LCD.h:40
#define M_BGCOLOR
Definition: mainwnd.c:88
void(Delete(void))
Definition: mainwnd.c:360
static void Inhouse(void)
Definition: mainwnd.c:812
const TEXTBOX_t tb_menu1[]
static
Initial value:
= {
(TEXTBOX_t){.x0 = COL1, .y0 = 10, .text = " Colours/Beep ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = Colours , .cbparam = 1, .next = (void*)&tb_menu1[1] },
(TEXTBOX_t){.x0 = COL1, .y0 = 60, .text = " Configuration ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = CFG_ParamWnd , .cbparam = 1, .next = (void*)&tb_menu1[2] },
(TEXTBOX_t){.x0 = COL1, .y0 = 110, .text = " Calibration ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = MenuCalibration , .cbparam = 1, .next = (void*)&tb_menu1[3] },
(TEXTBOX_t){.x0 = COL1, .y0 = 160, .text = " DSP ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = FFTWND_Proc , .cbparam = 1, .next = (void*)&tb_menu1[4] },
(TEXTBOX_t){ .x0 = COL2, .y0 = 10, .text = " Accu Settings ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = MenuAccu , .cbparam = 1,.next = (void*)&tb_menu1[5]},
(TEXTBOX_t){ .x0 = COL2, .y0 = 60, .text = " Date/Time ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = MenuRTC , .cbparam = 1,.next = (void*)&tb_menu1[6]},
(TEXTBOX_t){ .x0 = COL1, .y0 = 210, .text = " Main Menu ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = LCD_RED, .cb = (void(*)(void))Exit, .cbparam = 1,},
}
Definition: textbox.h:15
#define COL1
Definition: mainwnd.c:91
void FFTWND_Proc(void)
Definition: fftwnd.c:174
static void MenuRTC(void)
Definition: mainwnd.c:1190
#define M_FGCOLOR
Definition: mainwnd.c:89
#define COL2
Definition: mainwnd.c:92
uint16_t x0
Definition: textbox.h:22
void Exit(void)
Definition: mainwnd.c:440
static void Colours(void)
Definition: mainwnd.c:869
static void MenuCalibration(void)
Definition: mainwnd.c:1421
Definition: font.h:18
static const TEXTBOX_t tb_menu1[]
Definition: mainwnd.c:1253
void CFG_ParamWnd(void)
Definition: config.c:730
Definition: LCD.h:40
#define M_BGCOLOR
Definition: mainwnd.c:88
void(Delete(void))
Definition: mainwnd.c:360
static void MenuAccu(void)
Definition: mainwnd.c:1135
const TEXTBOX_t tb_menu2[]
static
Initial value:
= {
(TEXTBOX_t){.x0 = COL1, .y0 = 100, .text = " HW Calibration, only at first run !!! ", .font = FONT_FRANBIG,.width = 440, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = OSL_CalErrCorr , .cbparam = 1, .next = (void*)&tb_menu2[1] },
(TEXTBOX_t){.x0 = COL1, .y0 =25, .text = " OSL Calibration, use calibration kit !!! ", .font = FONT_FRANBIG,.width = 440, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = OSL_CalWnd , .cbparam = 1, .next = (void*)&tb_menu2[2] },
(TEXTBOX_t){.x0 = COL1, .y0 =150, .text = " Oscillator Test (Fmax) ", .font = FONT_FRANBIG,.width = 440, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = OsciTest , .cbparam = 1, .next = (void*)&tb_menu2[3] },
(TEXTBOX_t){ .x0 = COL1, .y0 = 210, .text = " Main Menu ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = LCD_RED, .cb = (void(*)(void))Exit, .cbparam = 1,},
}
Definition: textbox.h:15
#define COL1
Definition: mainwnd.c:91
#define M_FGCOLOR
Definition: mainwnd.c:89
void OSL_CalErrCorr(void)
Definition: oslcal.c:202
void OSL_CalWnd(void)
Definition: oslcal.c:119
uint16_t x0
Definition: textbox.h:22
void Exit(void)
Definition: mainwnd.c:440
Definition: font.h:18
void OsciTest(void)
Definition: mainwnd.c:1350
Definition: LCD.h:40
#define M_BGCOLOR
Definition: mainwnd.c:88
void(Delete(void))
Definition: mainwnd.c:360
static const TEXTBOX_t tb_menu2[]
Definition: mainwnd.c:1410
const TEXTBOX_t tb_menuTools[]
static
Initial value:
= {
(TEXTBOX_t){.x0 = COL1, .y0 = 10, .text = " Cable Length ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = TDR_Proc, .cbparam = 1, .next = (void*)&tb_menuTools[1] },
(TEXTBOX_t){.x0 = COL1, .y0 = 60, .text = " Find Frequency ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = SPECTR_FindFreq , .cbparam = 1, .next = (void*)&tb_menuTools[2] },
(TEXTBOX_t){.x0 = COL1, .y0 = 110, .text = " Quartz Data ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = Quartz_proc , .cbparam = 1, .next = (void*)&tb_menuTools[3] },
(TEXTBOX_t){ .x0 = COL1, .y0 = 210, .text = " Main Menu ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = LCD_RED, .cb = (void(*)(void))Exit, .cbparam = 1,},
}
Definition: textbox.h:15
#define COL1
Definition: mainwnd.c:91
static const TEXTBOX_t tb_menuTools[]
Definition: mainwnd.c:914
void TDR_Proc(void)
Definition: tdr.c:528
#define M_FGCOLOR
Definition: mainwnd.c:89
void SPECTR_FindFreq(void)
Definition: spectr.c:846
uint16_t x0
Definition: textbox.h:22
void Quartz_proc(void)
Definition: panvswr2.c:2314
void Exit(void)
Definition: mainwnd.c:440
Definition: font.h:18
Definition: LCD.h:40
#define M_BGCOLOR
Definition: mainwnd.c:88
void(Delete(void))
Definition: mainwnd.c:360
const TEXTBOX_t tb_reload[]
static
Initial value:
= {
(TEXTBOX_t){ .x0 = TBX0+200, .y0 = 10, .text = "Up", .font = FONT_FRANBIG, .width = Fieldw1, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_BLACK, .cb = (void(*)(void))Prev, .cbparam = 1, .next = (void*)&tb_reload[1] },
(TEXTBOX_t){ .x0 = TBX0+200, .y0 = 10+FieldH+1, .text = "Down", .font = FONT_FRANBIG, .width = Fieldw1, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_BLACK, .cb = (void(*)(void))Next, .cbparam = 1, .next = (void*)&tb_reload[2] },
(TEXTBOX_t){ .x0 = TBX0+200, .y0 = 234, .text = "Delete", .font = FONT_FRANBIG, .width = Fieldw1, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_RED, .cb = (void(*)(void))Delete, .cbparam = 1, .next = (void*)&tb_reload[3] },
(TEXTBOX_t){ .x0 = TBX0+200, .y0 = TBY+18, .text = "Show", .font = FONT_FRANBIG, .width = Fieldw1, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_GREEN, .cb = (void(*)(void))ShowP, .cbparam = 1, .next = (void*)&tb_reload[4] },
(TEXTBOX_t){ .x0 = 2, .y0 = 234, .text = " Exit ", .font = FONT_FRANBIG, .width = 100, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_BLACK, .cb = (void(*)(void))Exit, .cbparam = 1, .next =(void*)&tb_reload[5] },
(TEXTBOX_t){ .x0 = 80, .y0 = 234, .text = " Next Page", .font = FONT_FRANBIG, .width = 150, .height = FieldH, .center = 1,
.border = 1, .fgcolor = LCD_WHITE, .bgcolor = LCD_BLACK, .cb = (void(*)(void))NextPage, .cbparam = 1,},
}
Definition: textbox.h:15
#define TBX0
Definition: mainwnd.c:353
Definition: LCD.h:38
#define FieldH
Definition: mainwnd.c:357
Definition: LCD.h:41
static const TEXTBOX_t tb_reload[]
Definition: mainwnd.c:445
#define TBY
Definition: mainwnd.c:358
uint16_t x0
Definition: textbox.h:22
void Exit(void)
Definition: mainwnd.c:440
Definition: font.h:18
#define Fieldw1
Definition: mainwnd.c:354
Definition: LCD.h:40
Definition: LCD.h:46
void(Delete(void))
Definition: mainwnd.c:360
char text1[25]
uint32_t time
static
uint32_t time2
static
USBD_HandleTypeDef USBD_Device
static
int Volt_max_Display
static
int Volt_max_Factor
static
const TEXTBOX_t volt_menu[]
static
Initial value:
= {
(TEXTBOX_t){.x0 = COL1, .y0 = 10, .text = " -0.01 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = minus10 , .cbparam = 1, .next = (void*)&volt_menu[1] },
(TEXTBOX_t){.x0 = COL3, .y0 = 10, .text = " +0.01 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = plus10 , .cbparam = 1, .next = (void*)&volt_menu[2] },
(TEXTBOX_t){.x0 = COL1, .y0 = 60, .text = " -0.1 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = minus100 , .cbparam = 1, .next = (void*)&volt_menu[3] },
(TEXTBOX_t){.x0 = COL3, .y0 = 60, .text = " +0.1 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = plus100 , .cbparam = 1, .next = (void*)&volt_menu[4] },
(TEXTBOX_t){.x0 = COL1, .y0 = 110, .text = " -1.0 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = minus1000 , .cbparam = 1, .next = (void*)&volt_menu[5] },
(TEXTBOX_t){.x0 = COL3, .y0 = 110, .text = " +1.0 ", .font = FONT_FRANBIG,.width = 90, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = plus1000 , .cbparam = 1, .next = (void*)&volt_menu[6] },
(TEXTBOX_t){.x0 = 110, .y0 = 110, .text = "Set Max Value", .font = FONT_FRANBIG,.width = 220, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = SetMax , .cbparam = 1, .next = (void*)&volt_menu[7] },
(TEXTBOX_t){.x0 = COL1, .y0 = 160, .text = " Volt Max Displ ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = VoltCase1 , .cbparam = 1, .next = (void*)&volt_menu[8] },
(TEXTBOX_t){.x0 = COL2, .y0 = 160, .text = " Volt Min Displ ", .font = FONT_FRANBIG,.width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = VoltCase2 , .cbparam = 1, .next = (void*)&volt_menu[9] },
(TEXTBOX_t){ .x0 = COL2, .y0 = 210, .text = "Voltage Display Off", .font = FONT_FRANBIG, .width = 240, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = M_BGCOLOR, .cb = VoltOff , .cbparam = 1,.next = (void*)&volt_menu[10]},
(TEXTBOX_t){ .x0 = COL1, .y0 = 210, .text = " Main Menu ", .font = FONT_FRANBIG, .width = 200, .height = 34, .center = 1,
.border = 1, .fgcolor = M_FGCOLOR, .bgcolor = LCD_RED, .cb = (void(*)(void))Exit3, .cbparam = 1,},
}
Definition: textbox.h:15
#define COL1
Definition: mainwnd.c:91
void VoltCase1(void)
Definition: mainwnd.c:1054
static void Exit3(void)
Definition: mainwnd.c:1069
static const TEXTBOX_t volt_menu[]
Definition: mainwnd.c:1108
void plus1000(void)
Definition: mainwnd.c:1047
#define M_FGCOLOR
Definition: mainwnd.c:89
#define COL2
Definition: mainwnd.c:92
void minus10(void)
Definition: mainwnd.c:1016
void SetMax(void)
Definition: mainwnd.c:1098
void VoltOff(void)
Definition: mainwnd.c:1089
#define COL3
Definition: mainwnd.c:955
void plus100(void)
Definition: mainwnd.c:1041
void plus10(void)
Definition: mainwnd.c:1035
uint16_t x0
Definition: textbox.h:22
Definition: font.h:18
void VoltCase2(void)
Definition: mainwnd.c:1060
void minus100(void)
Definition: mainwnd.c:1022
void minus1000(void)
Definition: mainwnd.c:1028
Definition: LCD.h:40
#define M_BGCOLOR
Definition: mainwnd.c:88
void(Delete(void))
Definition: mainwnd.c:360
int Volt_min_Display
static
int voltage
static
int VoltCase
static
float VoltFloat