comparison Discovery/Src/t7.c @ 660:f4b553da620a

Add option to reset bluetooth name
author heinrichsweikamp
date Sun, 08 Aug 2021 09:36:23 +0200
parents 3ccf13af4651
children 87bee7cc77b3
comparison
equal deleted inserted replaced
659:0a915a789873 660:f4b553da620a
33 #include "data_exchange_main.h" 33 #include "data_exchange_main.h"
34 #include "decom.h" 34 #include "decom.h"
35 #include "gfx_fonts.h" 35 #include "gfx_fonts.h"
36 #include "logbook_miniLive.h" 36 #include "logbook_miniLive.h"
37 #include "math.h" 37 #include "math.h"
38 #include "tComm.h"
38 #include "tHome.h" 39 #include "tHome.h"
39 #include "simulation.h" 40 #include "simulation.h"
40 #include "timer.h" 41 #include "timer.h"
41 #include "unit.h" 42 #include "unit.h"
42 #include "motion.h" 43 #include "motion.h"
741 sprintf(text,"Settings: %u",errorsInSettings); 742 sprintf(text,"Settings: %u",errorsInSettings);
742 GFX_write_string_color(&FontT42,&t7surfaceR,text,4,CLUT_WarningRed); 743 GFX_write_string_color(&FontT42,&t7surfaceR,text,4,CLUT_WarningRed);
743 } 744 }
744 else 745 else
745 */ 746 */
746 if(DataEX_was_power_on()) 747 if(DataEX_was_power_on()) {
747 GFX_write_string_color(&FontT42,&t7surfaceR,"cold start",4,CLUT_WarningRed); 748 GFX_write_string_color(&FontT42,&t7surfaceR,"cold start",4,CLUT_WarningRed);
749 // Reset the bluetooth interface after a cold start
750 tComm_Set_Bluetooth_Name(1);
751 }
748 752
749 /* time and date */ 753 /* time and date */
750 translateDate(stateUsed->lifeData.dateBinaryFormat, &Sdate); 754 translateDate(stateUsed->lifeData.dateBinaryFormat, &Sdate);
751 translateTime(stateUsed->lifeData.timeBinaryFormat, &Stime); 755 translateTime(stateUsed->lifeData.timeBinaryFormat, &Stime);
752 756
1608 } 1612 }
1609 1613
1610 uint8_t t7_change_customview(uint8_t action) 1614 uint8_t t7_change_customview(uint8_t action)
1611 { 1615 {
1612 uint8_t *pViews; 1616 uint8_t *pViews;
1613 uint8_t *pStartView,*pCurView, *pLastView; 1617 uint8_t *pStartView,*pLastView;
1618 uint8_t *pCurView = NULL;
1614 _Bool cv_disabled = 0; 1619 _Bool cv_disabled = 0;
1615 1620
1616 if(stateUsed->mode == MODE_DIVE) 1621 if(stateUsed->mode == MODE_DIVE)
1617 pViews = (uint8_t*)customviewsDive; 1622 pViews = (uint8_t*)customviewsDive;
1618 else 1623 else