mirror of https://github.com/rusefi/bldc.git
Add COMM_GET_MCCONF_TEMP command
This commit is contained in:
parent
4be557c72b
commit
f6d7ed1fd2
|
@ -1,5 +1,6 @@
|
|||
=== FW 5.02 <dev> ===
|
||||
* IMU calibration improvement.
|
||||
* Add COMM_GET_MCCONF_TEMP command
|
||||
|
||||
=== FW 5.01 ===
|
||||
* Fixed PPM bug in previous release.
|
||||
|
@ -480,4 +481,3 @@
|
|||
* Hardware specific default configuration support.
|
||||
* Stop functionality for apps so that reboots are not required anymore when changing app.
|
||||
* EEPROM emulation bug fix: https://github.com/vedderb/bldc/issues/27
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26
commands.c
26
commands.c
|
@ -881,6 +881,32 @@ void commands_process_packet(unsigned char *data, unsigned int len,
|
|||
mempools_free_mcconf(mcconf);
|
||||
} break;
|
||||
|
||||
case COMM_GET_MCCONF_TEMP: {
|
||||
mc_configuration *mcconf = mempools_alloc_mcconf();
|
||||
*mcconf = *mc_interface_get_configuration();
|
||||
int32_t ind = 0;
|
||||
uint8_t *send_buffer = send_buffer_global;
|
||||
|
||||
send_buffer[ind++] = packet_id;
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_current_min_scale, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_current_max_scale, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_min_erpm, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_max_erpm, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_min_duty, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_max_duty, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_watt_min, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_watt_max, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_in_current_min, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->l_in_current_max, &ind);
|
||||
//Setup config needed for speed calculation
|
||||
send_buffer[ind++] = (uint8_t)mcconf->si_motor_poles;
|
||||
buffer_append_float32_auto(send_buffer, mcconf->si_gear_ratio, &ind);
|
||||
buffer_append_float32_auto(send_buffer, mcconf->si_wheel_diameter, &ind);
|
||||
|
||||
reply_func(send_buffer, ind);
|
||||
mempools_free_mcconf(mcconf);
|
||||
} break;
|
||||
|
||||
case COMM_EXT_NRF_PRESENT: {
|
||||
if (!conf_general_permanent_nrf_found) {
|
||||
nrf_driver_init_ext_nrf();
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FW_VERSION_MAJOR 5
|
||||
#define FW_VERSION_MINOR 02
|
||||
// Set to 0 for building a release and iterate during beta test builds
|
||||
#define FW_TEST_VERSION_NUMBER 1
|
||||
#define FW_TEST_VERSION_NUMBER 2
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
|
|
|
@ -768,7 +768,8 @@ typedef enum {
|
|||
COMM_SET_BLE_NAME,
|
||||
COMM_SET_BLE_PIN,
|
||||
COMM_SET_CAN_MODE,
|
||||
COMM_GET_IMU_CALIBRATION
|
||||
COMM_GET_IMU_CALIBRATION,
|
||||
COMM_GET_MCCONF_TEMP
|
||||
} COMM_PACKET_ID;
|
||||
|
||||
// CAN commands
|
||||
|
|
Loading…
Reference in New Issue