main/ims_sensorshoe.c
/*
 * Get measurement arrays from flash so that recalibration isnt necessary each time
 */
Get measurement arrays from flash so that recalibration isnt necessary each time
Get measurement arrays from flash so that recalibration isnt necessary each time
void initShoeSensor(void){
	char str[10] = "";
	for(int ii = 0; ii < ADCBUFSIZE; ii++){
		sprintf(str, "max%d", ii);
		if( !get_flash_uint16( &max[ii], str) ){
			max[ii] = 0;
			set_flash_uint16( max[ii], str);
		}
		sprintf(str, "min%d", ii);
		if( !get_flash_uint16( &min[ii], str) ){
			min[ii] = 0xFFFF;
			set_flash_uint16( min[ii], str);
		}
		sprintf(str, "thresh%d", ii);
		if( !get_flash_uint16( &thresh[ii], str) ){
			thresh[ii] = 0xFFFF;
			set_flash_uint16( thresh[ii], str);
		}
	}
	return;
}
void initShoeSensor ( void ) { char str [ 10 ] = " " ; for ( int ii = 0 ; ii < ADCBUFSIZE ; ii ++ ) { sprintf ( str , " " , ii ) ; if ( ! get_flash_uint16 ( & max [ ii ] , str ) ) { max [ ii ] = 0 ; set_flash_uint16 ( max [ ii ] , str ) ; } sprintf ( str , " " , ii ) ; if ( ! get_flash_uint16 ( & min [ ii ] , str ) ) { min [ ii ] = 0xFFFF ; set_flash_uint16 ( min [ ii ] , str ) ; } sprintf ( str , " " , ii ) ; if ( ! get_flash_uint16 ( & thresh [ ii ] , str ) ) { thresh [ ii ] = 0xFFFF ; set_flash_uint16 ( thresh [ ii ] , str ) ; } } return ; }
Get measurement arrays from flash so that recalibration isnt necessary each time
Get measurement arrays from flash so that recalibration isnt necessary each time