Skip to content

Commit

Permalink
strange u_int type
Browse files Browse the repository at this point in the history
  • Loading branch information
pat1 committed Nov 2, 2023
1 parent 9c79c69 commit 7bec6ae
Show file tree
Hide file tree
Showing 44 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion platformio/stima_v4/slave-mppt/src/tasks/can_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ CanTask::CanTask(const char *taskName, uint16_t stackSize, uint8_t priority, Can
/// @brief local stack Monitor (optional)
void CanTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ElaborateDataTask::ElaborateDataTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void ElaborateDataTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -585,4 +585,4 @@ void addValue(buffer_g *buffer, length_v length, value_v value)
{
*buffer->write_ptr = (value_v)value;
incrementBuffer<buffer_g, length_v>(buffer, length);
}
}
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-mppt/src/tasks/mppt_sensor_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ MpptSensorTask::MpptSensorTask(const char *taskName, uint16_t stackSize, uint8_t
/// @brief local stack Monitor (optional)
void MpptSensorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -227,4 +227,4 @@ void MpptSensorTask::Run() {
}
}

#endif
#endif
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-mppt/src/tasks/supervisor_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SupervisorTask::SupervisorTask(const char *taskName, uint16_t stackSize, uint8_t
/// @brief local stack Monitor (optional)
void SupervisorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -370,4 +370,4 @@ void SupervisorTask::printConfiguration()
TRACE_INFO_F(F("-> acquisition delay: %u [ms]\r\n"), param.configuration->sensor_acquisition_delay_ms);

param.configurationLock->Give();
}
}
8 changes: 4 additions & 4 deletions platformio/stima_v4/slave-mppt/src/tasks/wdt_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ WdtTask::WdtTask(const char *taskName, uint16_t stackSize, uint8_t priority, Wdt

void WdtTask::Run() {
bool firsCheck = true;
u_int16_t stackUsage;
uint16_t stackUsage;
char strTask[12] = {0};
u_int8_t last_day_boot_rst;
uint8_t last_day_boot_rst;

// WDT Start to Normal...
param.systemStatusLock->Take();
Expand Down Expand Up @@ -115,7 +115,7 @@ void WdtTask::Run() {
// Logging Stack (Only ready module task controlled)
#if (ENABLE_STACK_USAGE)
// Update This Task
stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[WDT_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[WDT_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -201,4 +201,4 @@ void WdtTask::Run() {
}
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int32_t Accelerometer::iis328dq_write_reg(uint8_t reg, uint8_t *data, uint16_t l
void Accelerometer::push_raw_data(int16_t *data_raw)
{
// Scroll Value
for(u_int8_t i = (ARR_REG_FILTER-1); i>0; i--) {
for(uint8_t i = (ARR_REG_FILTER-1); i>0; i--) {
_raw_scroll[0][i] = _raw_scroll[0][i-1];
_raw_scroll[1][i] = _raw_scroll[1][i-1];
_raw_scroll[2][i] = _raw_scroll[2][i-1];
Expand All @@ -132,7 +132,7 @@ void Accelerometer::push_raw_data(int16_t *data_raw)
int16_t Accelerometer::get_raw_mean(coordinate request) {
uint32_t tmp_data = 0;
uint8_t tmp_count = 0;
for(u_int8_t i=0; i<ARR_REG_FILTER; i++) {
for(uint8_t i=0; i<ARR_REG_FILTER; i++) {
if((_raw_scroll[request][i]>=-16000) && (_raw_scroll[request][i]<=16000)) {
tmp_data += _raw_scroll[request][i];
tmp_count++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ AccelerometerTask::AccelerometerTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void AccelerometerTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -475,4 +475,4 @@ void AccelerometerTask::powerDownModule(void)
accelerometer.iis328dq_block_data_update_set(PROPERTY_DISABLE);
}

#endif
#endif
2 changes: 1 addition & 1 deletion platformio/stima_v4/slave-radiation/src/tasks/can_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ CanTask::CanTask(const char *taskName, uint16_t stackSize, uint8_t priority, Can
/// @brief local stack Monitor (optional)
void CanTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ElaborateDataTask::ElaborateDataTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void ElaborateDataTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SolarRadiationSensorTask::SolarRadiationSensorTask(const char *taskName, uint16_
/// @brief local stack Monitor (optional)
void SolarRadiationSensorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -433,4 +433,4 @@ float SolarRadiationSensorTask::getSolarRadiation(float adc_value, float adc_vol
return round(value);
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SupervisorTask::SupervisorTask(const char *taskName, uint16_t stackSize, uint8_t
/// @brief local stack Monitor (optional)
void SupervisorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -578,4 +578,4 @@ void SupervisorTask::printConfiguration()
TRACE_INFO_F(F("-> acquisition delay: %u [ms]\r\n"), param.configuration->sensor_acquisition_delay_ms);

param.configurationLock->Give();
}
}
8 changes: 4 additions & 4 deletions platformio/stima_v4/slave-radiation/src/tasks/wdt_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ WdtTask::WdtTask(const char *taskName, uint16_t stackSize, uint8_t priority, Wdt

void WdtTask::Run() {
bool firsCheck = true;
u_int16_t stackUsage;
uint16_t stackUsage;
char strTask[12] = {0};
u_int8_t last_day_boot_rst;
uint8_t last_day_boot_rst;

// WDT Start to Normal...
param.systemStatusLock->Take();
Expand Down Expand Up @@ -115,7 +115,7 @@ void WdtTask::Run() {
// Logging Stack (Only ready module task controlled)
#if (ENABLE_STACK_USAGE)
// Update This Task
stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[WDT_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[WDT_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -203,4 +203,4 @@ void WdtTask::Run() {
}
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class canardClass {

// Tipologie elaborazioni/sensori modulo(i)
// tbr (Standard rain), tbm (Rain with full maintenance data value)
enum Sensor_Type : u_int8_t {
enum Sensor_Type : uint8_t {
tbr,
tpr,
tbm
Expand Down
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-rain/src/drivers/accelerometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int32_t Accelerometer::iis328dq_write_reg(uint8_t reg, uint8_t *data, uint16_t l
void Accelerometer::push_raw_data(int16_t *data_raw)
{
// Scroll Value
for(u_int8_t i = (ARR_REG_FILTER-1); i>0; i--) {
for(uint8_t i = (ARR_REG_FILTER-1); i>0; i--) {
_raw_scroll[0][i] = _raw_scroll[0][i-1];
_raw_scroll[1][i] = _raw_scroll[1][i-1];
_raw_scroll[2][i] = _raw_scroll[2][i-1];
Expand All @@ -132,7 +132,7 @@ void Accelerometer::push_raw_data(int16_t *data_raw)
int16_t Accelerometer::get_raw_mean(coordinate request) {
uint32_t tmp_data = 0;
uint8_t tmp_count = 0;
for(u_int8_t i=0; i<ARR_REG_FILTER; i++) {
for(uint8_t i=0; i<ARR_REG_FILTER; i++) {
if((_raw_scroll[request][i]>=-16000) && (_raw_scroll[request][i]<=16000)) {
tmp_data += _raw_scroll[request][i];
tmp_count++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ AccelerometerTask::AccelerometerTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void AccelerometerTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -501,4 +501,4 @@ void AccelerometerTask::powerDownModule(void)
accelerometer.iis328dq_block_data_update_set(PROPERTY_DISABLE);
}

#endif
#endif
2 changes: 1 addition & 1 deletion platformio/stima_v4/slave-rain/src/tasks/can_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ CanTask::CanTask(const char *taskName, uint16_t stackSize, uint8_t priority, Can
/// @brief local stack Monitor (optional)
void CanTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ElaborateDataTask::ElaborateDataTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void ElaborateDataTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-rain/src/tasks/rain_sensor_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RainSensorTask::RainSensorTask(const char *taskName, uint16_t stackSize, uint8_t
/// @brief local stack Monitor (optional)
void RainSensorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -395,4 +395,4 @@ void RainSensorTask::ISR_tipping_bucket() {
}
}

#endif
#endif
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-rain/src/tasks/supervisor_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SupervisorTask::SupervisorTask(const char *taskName, uint16_t stackSize, uint8_t
/// @brief local stack Monitor (optional)
void SupervisorTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -443,4 +443,4 @@ void SupervisorTask::printConfiguration()
TRACE_INFO_F(F("-> rain for tip: %u\r\n"), param.configuration->sensors.rain_for_tip);

param.configurationLock->Give();
}
}
8 changes: 4 additions & 4 deletions platformio/stima_v4/slave-rain/src/tasks/wdt_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ WdtTask::WdtTask(const char *taskName, uint16_t stackSize, uint8_t priority, Wdt

void WdtTask::Run() {
bool firsCheck = true;
u_int16_t stackUsage;
uint16_t stackUsage;
char strTask[12] = {0};
u_int8_t last_day_boot_rst;
uint8_t last_day_boot_rst;

// WDT Start to Normal...
param.systemStatusLock->Take();
Expand Down Expand Up @@ -115,7 +115,7 @@ void WdtTask::Run() {
// Logging Stack (Only ready module task controlled)
#if (ENABLE_STACK_USAGE)
// Update This Task
stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[WDT_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[WDT_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -203,4 +203,4 @@ void WdtTask::Run() {
}
}

#endif
#endif
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-th/include/canard_class_th.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class canardClass {
// ******************** Tipi di Dati *****************

// Tipologie elaborazioni/sensori modulo(i)
enum Sensor_Type : u_int8_t {
enum Sensor_Type : uint8_t {
ith,
mth,
nth,
Expand Down Expand Up @@ -422,4 +422,4 @@ class canardClass {
uint8_t _rxSubscriptionIdx;
};

#endif
#endif
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-th/src/drivers/accelerometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int32_t Accelerometer::iis328dq_write_reg(uint8_t reg, uint8_t *data, uint16_t l
void Accelerometer::push_raw_data(int16_t *data_raw)
{
// Scroll Value
for(u_int8_t i = (ARR_REG_FILTER-1); i>0; i--) {
for(uint8_t i = (ARR_REG_FILTER-1); i>0; i--) {
_raw_scroll[0][i] = _raw_scroll[0][i-1];
_raw_scroll[1][i] = _raw_scroll[1][i-1];
_raw_scroll[2][i] = _raw_scroll[2][i-1];
Expand All @@ -132,7 +132,7 @@ void Accelerometer::push_raw_data(int16_t *data_raw)
int16_t Accelerometer::get_raw_mean(coordinate request) {
uint32_t tmp_data = 0;
uint8_t tmp_count = 0;
for(u_int8_t i=0; i<ARR_REG_FILTER; i++) {
for(uint8_t i=0; i<ARR_REG_FILTER; i++) {
if((_raw_scroll[request][i]>=-16000) && (_raw_scroll[request][i]<=16000)) {
tmp_data += _raw_scroll[request][i];
tmp_count++;
Expand Down
4 changes: 2 additions & 2 deletions platformio/stima_v4/slave-th/src/tasks/accelerometer_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ AccelerometerTask::AccelerometerTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void AccelerometerTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down Expand Up @@ -475,4 +475,4 @@ void AccelerometerTask::powerDownModule(void)
accelerometer.iis328dq_block_data_update_set(PROPERTY_DISABLE);
}

#endif
#endif
2 changes: 1 addition & 1 deletion platformio/stima_v4/slave-th/src/tasks/can_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ CanTask::CanTask(const char *taskName, uint16_t stackSize, uint8_t priority, Can
/// @brief local stack Monitor (optional)
void CanTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ElaborateDataTask::ElaborateDataTask(const char *taskName, uint16_t stackSize, u
/// @brief local stack Monitor (optional)
void ElaborateDataTask::TaskMonitorStack()
{
u_int16_t stackUsage = (u_int16_t)uxTaskGetStackHighWaterMark( NULL );
uint16_t stackUsage = (uint16_t)uxTaskGetStackHighWaterMark( NULL );
if((stackUsage) && (stackUsage < param.system_status->tasks[LOCAL_TASK_ID].stack)) {
param.systemStatusLock->Take();
param.system_status->tasks[LOCAL_TASK_ID].stack = stackUsage;
Expand Down
Loading

0 comments on commit 7bec6ae

Please sign in to comment.