IO firmware: Convert magic numbers to defines

This is necessary to allow more and better unit testing.
This commit is contained in:
Lorenz Meier
2017-01-03 20:32:33 -05:00
committed by Daniel Agar
parent e395c1f3d7
commit d401252c9e
5 changed files with 55 additions and 7 deletions
+2 -2
View File
@@ -69,8 +69,8 @@ static const uint16_t r_page_config[] = {
#else
[PX4IO_P_CONFIG_HARDWARE_VERSION] = 1,
#endif
[PX4IO_P_CONFIG_BOOTLOADER_VERSION] = 3, /* XXX hardcoded magic number */
[PX4IO_P_CONFIG_MAX_TRANSFER] = 64, /* XXX hardcoded magic number */
[PX4IO_P_CONFIG_BOOTLOADER_VERSION] = PX4IO_BL_VERSION,
[PX4IO_P_CONFIG_MAX_TRANSFER] = PX4IO_MAX_TRANSFER_LEN,
[PX4IO_P_CONFIG_CONTROL_COUNT] = PX4IO_CONTROL_CHANNELS,
[PX4IO_P_CONFIG_ACTUATOR_COUNT] = PX4IO_SERVO_COUNT,
[PX4IO_P_CONFIG_RC_INPUT_COUNT] = PX4IO_RC_INPUT_CHANNELS,