// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // set menu pointers to default menu items ptrMenu_L1 = &menu_L1_Acceleration; ptrMenu_L2 = &menu_L2_Stopwatch; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units when displaying values sys.flag.use_metric_units = 1; #endif // Set buzzer to default value reset_buzzer(); // Reset stopwatch reset_stopwatch(); // Reset acceleration measurement reset_acceleration(); }
// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // -------------------------------------------- // Apply default settings // set menu pointers to default menu items ptrMenu_L1 = &menu_L1_Time; ptrMenu_L2 = &menu_L2_DataLog; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units for display sys.flag.use_metric_units = 1; #endif // Read calibration values from info memory read_calibration_values(); // Set system time to default value reset_clock(); // Set date to default value reset_date(); // Set buzzer to default value reset_buzzer(); // Reset altitude measurement reset_altitude_measurement(); // Reset acceleration measurement reset_acceleration(); #ifdef INCLUDE_BLUEROBIN_SUPPORT // Reset BlueRobin stack reset_bluerobin(); #endif // Reset SimpliciTI stack reset_rf(); // Reset battery measurement reset_batt_measurement(); // Reset data logger reset_datalog(); }
// ************************************************************************************************* // soft alaram functions void soft_alarm_stop() { TA0CCTL1 &= ~CCIE; display_symbol(LCD_ICON_ALARM, SEG_ON_BLINK_OFF); if (is_acceleration_measurement()) { bmp_as_stop(); sAccel.mode=ACCEL_MODE_OFF; } softalarmzone=0; reset_acceleration(); }
// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // -------------------------------------------- // Apply default settings // set menu pointers to default menu items ptrMenu_L1 = &menu_L1_Time; // ptrMenu_L1 = &menu_L1_Alarm; // ptrMenu_L1 = &menu_L1_Heartrate; // ptrMenu_L1 = &menu_L1_Speed; // ptrMenu_L1 = &menu_L1_Temperature; // ptrMenu_L1 = &menu_L1_Altitude; // ptrMenu_L1 = &menu_L1_Acceleration; ptrMenu_L2 = &menu_L2_Date; // ptrMenu_L2 = &menu_L2_Stopwatch; // ptrMenu_L2 = &menu_L2_Rf; // ptrMenu_L2 = &menu_L2_Ppt; // ptrMenu_L2 = &menu_L2_Sync; // ptrMenu_L2 = &menu_L2_Distance; // ptrMenu_L2 = &menu_L2_Calories; // ptrMenu_L2 = &menu_L2_Battery; // ptrMenu_L2 = &menu_L2_Phase; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units when displaying values sys.flag.use_metric_units = 1; #else #ifdef CONFIG_METRIC_ONLY sys.flag.use_metric_units = 1; #endif #endif // Read calibration values from info memory read_calibration_values(); // Set system time to default value reset_clock(); // Set date to default value reset_date(); // Set alarm time to default value reset_alarm(); // Set buzzer to default value reset_buzzer(); // Reset stopwatch reset_stopwatch(); // Reset altitude measurement #ifdef CONFIG_ALTITUDE reset_altitude_measurement(); #endif // Reset acceleration measurement reset_acceleration(); // Reset BlueRobin stack //pfs #ifndef ELIMINATE_BLUEROBIN reset_bluerobin(); #endif #ifdef CONFIG_EGGTIMER //Set Eggtimer to a 5 minute default memcpy(seggtimer.defaultTime, "00010000", sizeof(seggtimer.time)); reset_eggtimer(); #endif #ifdef CONFIG_PHASE_CLOCK // default program sPhase.program = 0; #endif // Reset SimpliciTI stack reset_rf(); // Reset temperature measurement reset_temp_measurement(); // Reset battery measurement reset_batt_measurement(); battery_measurement(); }
// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // -------------------------------------------- // Apply default settings // set menu pointers to default menu items ptrMenu_L1 = &menu_L1_Time; // ptrMenu_L1 = &menu_L1_Alarm; // ptrMenu_L1 = &menu_L1_Heartrate; // ptrMenu_L1 = &menu_L1_Speed; // ptrMenu_L1 = &menu_L1_Temperature; // ptrMenu_L1 = &menu_L1_Altitude; // ptrMenu_L1 = &menu_L1_Acceleration; ptrMenu_L2 = &menu_L2_Date; // ptrMenu_L2 = &menu_L2_Stopwatch; // ptrMenu_L2 = &menu_L2_Rf; // ptrMenu_L2 = &menu_L2_Ppt; // ptrMenu_L2 = &menu_L2_Sync; // ptrMenu_L2 = &menu_L2_Distance; // ptrMenu_L2 = &menu_L2_Calories; // ptrMenu_L2 = &menu_L2_Battery; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units when displaying values sys.flag.use_metric_units = 1; #endif // Read calibration values from info memory read_calibration_values(); // Set system time to default value reset_clock(); // Set date to default value reset_date(); // Set alarm time to default value reset_alarm(); // Set buzzer to default value reset_buzzer(); // Reset stopwatch reset_stopwatch(); // Reset altitude measurement reset_altitude_measurement(); // Reset acceleration measurement reset_acceleration(); // Reset BlueRobin stack reset_bluerobin(); // Reset SimpliciTI stack reset_rf(); // Reset temperature measurement reset_temp_measurement(); // Reset battery measurement reset_batt_measurement(); battery_measurement(); //Set cdtimer to a 5:00 minute default memcpy(scdtimer.defaultTime, "000500", sizeof(scdtimer.time)); reset_cdtimer(); // Reset random generator reset_random(); // Reset agility measurement reset_agility(); // Reset number storage reset_number_storage(); }
// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // -------------------------------------------- // Apply default settings menu_L1_position=0; menu_L2_position=0; // set menu pointers to default menu items ptrMenu_L1 = menu_L1[menu_L1_position]; ptrMenu_L2 = menu_L2[menu_L2_position]; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units when displaying values sys.flag.use_metric_units = 1; #else #ifdef CONFIG_METRIC_ONLY sys.flag.use_metric_units = 1; #endif #endif // Read calibration values from info memory read_calibration_values(); #ifdef CONFIG_ALTI_ACCUMULATOR // By default, don't have the altitude accumulator running alt_accum_enable = 0; #endif #ifdef CONFIG_INFOMEM if(infomem_ready()==-2) { infomem_init(INFOMEM_C, INFOMEM_C+2*INFOMEM_SEGMENT_SIZE); } #endif // Set system time to default value reset_clock(); // Set date to default value reset_date(); #ifdef CONFIG_SIDEREAL reset_sidereal_clock(); #endif #ifdef CONFIG_ALARM // Set alarm time to default value reset_alarm(); #endif // Set buzzer to default value reset_buzzer(); #ifdef CONFIG_STOP_WATCH // Reset stopwatch reset_stopwatch(); #endif // Reset altitude measurement #ifdef CONFIG_ALTITUDE reset_altitude_measurement(); #endif #ifdef FEATURE_PROVIDE_ACCEL // Reset acceleration measurement reset_acceleration(); #endif // Reset BlueRobin stack //pfs #ifndef ELIMINATE_BLUEROBIN reset_bluerobin(); #endif #ifdef CONFIG_EGGTIMER init_eggtimer(); // Initialize eggtimer #endif #ifdef CONFIG_PROUT reset_prout(); #endif #ifdef CONFIG_PHASE_CLOCK // default program sPhase.program = 0; #endif // Reset SimpliciTI stack reset_rf(); // Reset temperature measurement reset_temp_measurement(); #ifdef CONFIG_BATTERY // Reset battery measurement reset_batt_measurement(); battery_measurement(); #endif }
// ************************************************************************************************* // @fn init_global_variables // @brief Initialize global variables. // @param none // @return none // ************************************************************************************************* void init_global_variables(void) { // -------------------------------------------- // Apply default settings // set menu pointers to default menu items //ptrMenu_L1 = &menu_L1_Time; ptrMenu_L1 = &menu_L1_Countdown; // ptrMenu_L1 = &menu_L1_Alarm; // ptrMenu_L1 = &menu_L1_Heartrate; // ptrMenu_L1 = &menu_L1_Speed; // ptrMenu_L1 = &menu_L1_Temperature; // ptrMenu_L1 = &menu_L1_Altitude; // ptrMenu_L1 = &menu_L1_Acceleration; // ptrMenu_L2 = &menu_L2_Date; // ptrMenu_L2 = &menu_L2_Stopwatch; ptrMenu_L2 = &menu_L2_Countup; // ptrMenu_L2 = &menu_L2_Rf; // ptrMenu_L2 = &menu_L2_Ppt; // ptrMenu_L2 = &menu_L2_Sync; // ptrMenu_L2 = &menu_L2_Distance; // ptrMenu_L2 = &menu_L2_Calories; // ptrMenu_L2 = &menu_L2_Battery; // Assign LINE1 and LINE2 display functions fptr_lcd_function_line1 = ptrMenu_L1->display_function; fptr_lcd_function_line2 = ptrMenu_L2->display_function; // Init system flags button.all_flags = 0; sys.all_flags = 0; request.all_flags = 0; display.all_flags = 0; message.all_flags = 0; // Force full display update when starting up display.flag.full_update = 1; #ifndef ISM_US // Use metric units when displaying values sys.flag.use_metric_units = 1; #endif // Read calibration values from info memory read_calibration_values(); // Set system time to default value //reset_clock(); // was enabled before // Set date to default value //reset_date(); // Set alarm time to default value //reset_alarm(); // Set buzzer to default value reset_buzzer(); // Reset stopwatch //reset_stopwatch(); // Reset altitude measurement //reset_altitude_measurement(); // Reset acceleration measurement reset_acceleration(); // Reset Countdown reset_countdown(); // Reset Countup reset_countup(); // Reset BlueRobin stack //reset_bluerobin(); // was enabled before // Reset SimpliciTI stack reset_rf(); // Reset temperature measurement //reset_temp_measurement(); // Reset battery measurement //reset_batt_measurement(); // was enabled before //battery_measurement(); // was enabled before }