|
@@ -158,11 +158,12 @@ void nbus_slave_unicastToSensorSet(nBus_TypeDef *nbus)
|
|
|
|
|
|
|
|
nbus->tx_buffer[4] = 1;
|
|
nbus->tx_buffer[4] = 1;
|
|
|
nbus->tx_length += 1;
|
|
nbus->tx_length += 1;
|
|
|
- }#include "nbus_slave.h"
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+#include "nbus_slave.h"
|
|
|
|
|
|
|
|
#if MODULE_SLAVE == 1
|
|
#if MODULE_SLAVE == 1
|
|
|
|
|
|
|
|
- void nbus_slave_unicastToSensorGet(nBus_TypeDef *nbus)
|
|
|
|
|
|
|
+ void nbus_slave_unicastToSensorGet(nBus_TypeDef * nbus)
|
|
|
{
|
|
{
|
|
|
switch (nbus->function_code.function)
|
|
switch (nbus->function_code.function)
|
|
|
{
|
|
{
|
|
@@ -187,7 +188,8 @@ void nbus_slave_unicastToSensorSet(nBus_TypeDef *nbus)
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
nbus->tx_buffer[4] = nbus->rx_buffer[3];
|
|
nbus->tx_buffer[4] = nbus->rx_buffer[3];
|
|
|
- int32_t param_value = nbus->interface->getParam(nbus->sensorInfo.address, (nBus_param_t)nbus->rx_buffer[3]);
|
|
|
|
|
|
|
+ int32_t param_value =
|
|
|
|
|
+ nbus->interface->getParam(nbus->sensorInfo.address, (nBus_param_t)nbus->rx_buffer[3]);
|
|
|
nbus->tx_buffer[5] = (uint8_t)(param_value & 0xFF);
|
|
nbus->tx_buffer[5] = (uint8_t)(param_value & 0xFF);
|
|
|
nbus->tx_buffer[6] = (uint8_t)((param_value >> 8) & 0xFF);
|
|
nbus->tx_buffer[6] = (uint8_t)((param_value >> 8) & 0xFF);
|
|
|
nbus->tx_buffer[7] = (uint8_t)((param_value >> 16) & 0xFF);
|
|
nbus->tx_buffer[7] = (uint8_t)((param_value >> 16) & 0xFF);
|
|
@@ -251,7 +253,7 @@ void nbus_slave_unicastToSensorSet(nBus_TypeDef *nbus)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- void nbus_slave_unicastToSensorSet(nBus_TypeDef *nbus)
|
|
|
|
|
|
|
+ void nbus_slave_unicastToSensorSet(nBus_TypeDef * nbus)
|
|
|
{
|
|
{
|
|
|
int32_t param_value;
|
|
int32_t param_value;
|
|
|
switch (nbus->function_code.function)
|
|
switch (nbus->function_code.function)
|
|
@@ -327,7 +329,7 @@ void nbus_slave_unicastToSensorSet(nBus_TypeDef *nbus)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- void sensor_store_param(nBus_TypeDef *nbus, uint8_t sensor_index, uint8_t param_name)
|
|
|
|
|
|
|
+ void sensor_store_param(nBus_TypeDef * nbus, uint8_t sensor_index, uint8_t param_name)
|
|
|
{
|
|
{
|
|
|
uint32_t param_value = nbus->interface->getParam(sensor_index, param_name);
|
|
uint32_t param_value = nbus->interface->getParam(sensor_index, param_name);
|
|
|
nbus->memoryInterface->storeParam(sensor_index, param_name, param_value);
|
|
nbus->memoryInterface->storeParam(sensor_index, param_name, param_value);
|