mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-08 02:15:53 +08:00
motors_commit_next needs to be non-static as it is called from i2c task
This commit is contained in:
@@ -46,6 +46,14 @@ static void buss_twi_blmc_send_next()
|
||||
i2c0_transmit(buss_twi_blmc_addr[buss_twi_blmc_idx], 1, &buss_twi_blmc_i2c_done);
|
||||
}
|
||||
|
||||
void motors_commit_next( void )
|
||||
{
|
||||
buss_twi_blmc_idx++;
|
||||
if (buss_twi_blmc_idx < BUSS_TWI_BLMC_NB_SEND)
|
||||
buss_twi_blmc_send_next();
|
||||
else
|
||||
buss_twi_blmc_status = BUSS_TWI_BLMC_STATUS_IDLE;
|
||||
}
|
||||
|
||||
void motors_commit(int force)
|
||||
{
|
||||
@@ -68,15 +76,6 @@ void motors_callback_nop()
|
||||
// We don't use this to kick the next command automatically anymore
|
||||
}
|
||||
|
||||
static void motors_commit_next()
|
||||
{
|
||||
buss_twi_blmc_idx++;
|
||||
if (buss_twi_blmc_idx < BUSS_TWI_BLMC_NB_SEND)
|
||||
buss_twi_blmc_send_next();
|
||||
else
|
||||
buss_twi_blmc_status = BUSS_TWI_BLMC_STATUS_IDLE;
|
||||
}
|
||||
|
||||
void motors_event( void )
|
||||
{
|
||||
// if busy sending, check progress
|
||||
|
||||
@@ -15,6 +15,7 @@ extern uint8_t motor_power[BUSS_TWI_BLMC_NB];
|
||||
void motors_init ( void );
|
||||
void motors_set_motor(uint8_t id, int16_t value);
|
||||
void motors_commit(int force);
|
||||
void motors_commit_next( void );
|
||||
void motors_callback_nop( void );
|
||||
void motors_event( void );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user