comparison Small_CPU/Src/spi.c @ 559:84a4e1200726

Check if HW evaluation was performed: Devicedata is only requested once at startup and then every 10 minutes. To make sure that HW information related to compass and ADC are forwarded, two indicators have been added which may delay the respond by one second.
author Ideenmodellierer
date Sun, 15 Nov 2020 19:52:03 +0100
parents 2fc08a0d1ec3
children 1b995079c045
comparison
equal deleted inserted replaced
558:66aef216828b 559:84a4e1200726
305 uint8_t * pOutput; 305 uint8_t * pOutput;
306 HAL_StatusTypeDef retval; 306 HAL_StatusTypeDef retval;
307 307
308 if ((global.dataSendToSlave.getDeviceDataNow) || (DeviceDataPending)) 308 if ((global.dataSendToSlave.getDeviceDataNow) || (DeviceDataPending))
309 { 309 {
310 if(((DevicedataDelayCnt == 0) || (((get_voltage() != 6.0) && (get_temperature() != 0.0))))) /* devicedata complete? */ 310 if(((DevicedataDelayCnt == 0) || (((get_voltage() != 6.0) && (get_temperature() != 0.0)
311 && global.deviceDataSendToMaster.hw_Info.checkCompass)
312 && global.deviceDataSendToMaster.hw_Info.checkADC))) /* devicedata complete? */
311 { 313 {
312 global.dataSendToSlave.getDeviceDataNow = 0; 314 global.dataSendToSlave.getDeviceDataNow = 0;
313 DeviceDataPending = 0; 315 DeviceDataPending = 0;
314 pOutput = (uint8_t*) &(global.deviceDataSendToMaster); 316 pOutput = (uint8_t*) &(global.deviceDataSendToMaster);
315 } 317 }