I would like to ask if pixhawk and APM2.5 have the same "motor to channel map" as the code in ap_motors_class.cpp is written as below:

#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
const uint8_t AP_Motors::_motor_to_channel_map[AP_MOTORS_MAX_NUM_MOTORS] PROGMEM = {APM1_MOTOR_TO_CHANNEL_MAP};
#else
const uint8_t AP_Motors::_motor_to_channel_map[AP_MOTORS_MAX_NUM_MOTORS] PROGMEM = {APM2_MOTOR_TO_CHANNEL_MAP};
#endif

I am thinking if they are sharing the same motor map?

I was using arducoper 3.0.1 previously and just started using arducoper 3.2 recently. I found out that the code is somewhat different from the previous version.

For instance,

V3.0.1 : hal.rcout -> write( channel, pwm)

V3.2 :    hal.rcout -> write(pgm_read_byte(channel),pwm)

May I know what is the difference? Can I remove the pgm_read_byte() from the code? Will it lead to any malfunction to the system after removing it?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Does anyone know how to get the motor start turning in the V3.2? it seems to me that 

    hal.rcout -> write(pgm_read_byte(channel),pwm)

    would work, but somehow it didn't. 

    Can someone tell me why?

This reply was deleted.

Activity