Move esc_status to generated topics

This commit is contained in:
Lorenz Meier
2015-05-25 19:14:48 +02:00
parent f7c9e918b1
commit e07731de7a
6 changed files with 37 additions and 123 deletions
+2 -2
View File
@@ -601,11 +601,11 @@ MK::task_main()
esc.counter++;
esc.timestamp = hrt_absolute_time();
esc.esc_count = (uint8_t) _num_outputs;
esc.esc_connectiontype = ESC_CONNECTION_TYPE_I2C;
esc.esc_connectiontype = esc_status_s::ESC_CONNECTION_TYPE_I2C;
for (unsigned int i = 0; i < _num_outputs; i++) {
esc.esc[i].esc_address = (uint8_t) BLCTRL_BASE_ADDR + i;
esc.esc[i].esc_vendor = ESC_VENDOR_MIKROKOPTER;
esc.esc[i].esc_vendor = esc_status_s::ESC_VENDOR_MIKROKOPTER;
esc.esc[i].esc_version = (uint16_t) Motor[i].Version;
esc.esc[i].esc_voltage = 0.0F;
esc.esc[i].esc_current = static_cast<float>(Motor[i].Current) * 0.1F;