20 #if LED_SCHEME==LED_SCHEME_BLINK 25 switch( g_sc.calState )
36 if( g_gpsTimeOfWeekMs >= g_led.gps_timeMs )
46 #elif LED_SCHEME==LED_SCHEME_HEARTBEAT 51 if( g_gpsTimeOfWeekMs >= g_led.gps_timeMs )
55 #define HEARTBEAT_RAMP_RATE (500/mainLED_FLASH_RATE) 56 #define HEARTBEAT_WAIT (100/mainLED_FLASH_RATE) 57 switch(g_led.heartbeat_state)
60 g_led.heartbeat_duty += HEARTBEAT_RAMP_RATE;
62 if( g_led.heartbeat_duty >= 100 )
64 g_led.heartbeat_duty = 100;
65 g_led.heartbeat_cnt = 0;
66 g_led.heartbeat_state = 1;
68 set_LED_PWM(g_led.heartbeat_duty);
72 if( ++g_led.heartbeat_cnt >= HEARTBEAT_WAIT )
73 g_led.heartbeat_state++;
77 g_led.heartbeat_duty -= HEARTBEAT_RAMP_RATE;
79 if( g_led.heartbeat_duty <= 0 )
81 g_led.heartbeat_duty = 0;
82 g_led.heartbeat_cnt = 0;
83 g_led.heartbeat_state++;
85 set_LED_PWM(g_led.heartbeat_duty);
89 if( ++g_led.heartbeat_cnt >= HEARTBEAT_WAIT )
90 g_led.heartbeat_state++;
94 #elif LED_SCHEME==LED_SCHEME_SOLID 104 if( g_sc.calState != SC_RUNTIME )
106 switch(g_sc.calState)
109 case SC_ORTH_SAMPLE_INIT:
113 case SC_ACCEL_ALIGN_CHECK:
114 if( g_sc.status == SC_STATUS_ALIGNED )
124 case SC_ORTH_SAMPLE_MEAN:
137 if( g_gpsTimeOfWeekMs < g_led.gps_timeMs )
180 #if LED_SCHEME==LED_SCHEME_BLINK 182 if( ++g_led.heartbeat_cnt >= 100 )
184 g_led.heartbeat_cnt = 0;
185 g_led.heartbeat_state = 1;
189 if( g_led.heartbeat_state && g_led.heartbeat_cnt >= g_led.heartbeat_duty )
191 g_led.heartbeat_state = 0;
224 g_nvmInternalFlashCfg->startupRmc[port] = g_rmci[port];
227 g_nvmInternalFlashCfg->startupAsciiPeriod[port] = g_asciiPeriod[port];
230 g_nvmInternalFlashCfg->startupCAN = g_CAN;
232 nvr_flash_config_write_needed_enable();
#define LED_COLOR_YELLOW()
rtos_task_t task[UINS_RTOS_NUM_TASKS]
void led_maintenance(void)
#define LED_COLOR_GREEN()
void save_persistent_messages(void)
void rtos_monitor(int numRtosTasks)
#define INS_STATUS_SOLUTION(insStatus)
#define LED_COLOR_WHITE()
#define LED_COLOR_PURPLE()
void vTaskDelay(const TickType_t xTicksToDelay) PRIVILEGED_FUNCTION
Autogenerated API include file for the Atmel Software Framework (ASF)
void rtos_maintenance(void)
void led_sys_heartbeat(void)