|
|
@@ -292,20 +292,34 @@ void Main_Menu(void)
|
|
|
|
|
|
void Main_Cycle(void)
|
|
|
{
|
|
|
- uint8_t sKey = 0;
|
|
|
+ uint8_t sKey[2] = {0};
|
|
|
Interface_PutString("\r\n\r\nS to start\r\n\r\n");
|
|
|
while(1)
|
|
|
{
|
|
|
if(1)
|
|
|
{
|
|
|
- if(Interface_Receive(&sKey, 1, RX_TIMEOUT) == HAL_OK)
|
|
|
+ if(Interface_Receive(sKey, 2, RX_TIMEOUT) == HAL_OK)
|
|
|
{
|
|
|
- if(sKey == 'S')
|
|
|
+ if(sKey[0] == 'S')
|
|
|
{
|
|
|
- Interface_Clean();
|
|
|
- uint8_t verStr[] = "1_01_250705\r\n";
|
|
|
+ uint8_t verStr[] = "BLA_V_1_01_250705\r\n";
|
|
|
Interface_Transmit(verStr, sizeof(verStr), 100);
|
|
|
- Main_Menu();
|
|
|
+ if(sKey[1] == '3'){
|
|
|
+ Interface_Clean();
|
|
|
+ Interface_PutString("\r\nStart program execution...\r\n");
|
|
|
+ JumpToAppWithReset();
|
|
|
+ }
|
|
|
+ else if(sKey[1] == '1'){
|
|
|
+ Interface_Clean();
|
|
|
+ if(Interface_Download() != COM_OK){
|
|
|
+ Interface_PutString("\r\nStart program execution...\r\n");
|
|
|
+ JumpToAppWithReset();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ Interface_Clean();
|
|
|
+ Main_Menu();
|
|
|
+ }
|
|
|
}
|
|
|
else{
|
|
|
Interface_Clean();
|