voltage calcultation moved to periodic_task

This commit is contained in:
Pascal Brisset
2006-07-11 22:00:56 +00:00
parent 2d711ad4eb
commit 430f40a87b
+8 -5
View File
@@ -133,10 +133,6 @@ void event_task_fbw( void) {
}
#endif
#ifdef ADC
fbw_vsupply_decivolt = VoltageOfAdc(vsupply_adc_buf.sum/vsupply_adc_buf.av_nb_sample) * 10;
#endif
#ifdef INTER_MCU
#ifdef MCU_SPI_LINK
if (spi_message_received) {
@@ -193,14 +189,21 @@ void periodic_task_fbw( void ) {
set_failsafe_mode();
#endif
#ifdef DOWNLINK
static uint8_t _10Hz; /* FIXME : sys_time should provide it */
_10Hz++;
if (_10Hz >= 6) _10Hz = 0;
#ifdef DOWNLINK
if (!_10Hz)
fbw_downlink_periodic_task();
#endif
#ifdef ADC
if (!_10Hz)
fbw_vsupply_decivolt = VoltageOfAdc((10*(vsupply_adc_buf.sum/vsupply_adc_buf.av_nb_sample)));
#endif
#ifdef ACTUATORS
#ifdef CTL_GRZ
ctl_grz_rate_run();