Skip to content

Commit eb1b1c4

Browse files
committed
Merge branch 'master' into develop
2 parents 0054dd2 + 7ea85ff commit eb1b1c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1607
-185
lines changed

src/apps/LoRaMac/common/CayenneLpp.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ uint8_t CayenneLppAddAnalogInput( uint8_t channel, float value )
9090
return 0;
9191
}
9292

93-
int16_t val = value * 100;
93+
int16_t val = ( int16_t ) ( value * 100 );
9494
CayenneLppBuffer[CayenneLppCursor++] = channel;
9595
CayenneLppBuffer[CayenneLppCursor++] = LPP_ANALOG_INPUT;
9696
CayenneLppBuffer[CayenneLppCursor++] = val >> 8;
@@ -105,7 +105,7 @@ uint8_t CayenneLppAddAnalogOutput( uint8_t channel, float value )
105105
{
106106
return 0;
107107
}
108-
int16_t val = value * 100;
108+
int16_t val = ( int16_t ) ( value * 100 );
109109
CayenneLppBuffer[CayenneLppCursor++] = channel;
110110
CayenneLppBuffer[CayenneLppCursor++] = LPP_ANALOG_OUTPUT;
111111
CayenneLppBuffer[CayenneLppCursor++] = val >> 8;
@@ -148,7 +148,7 @@ uint8_t CayenneLppAddTemperature( uint8_t channel, float celsius )
148148
{
149149
return 0;
150150
}
151-
int16_t val = celsius * 10;
151+
int16_t val = ( int16_t) ( celsius * 10 );
152152
CayenneLppBuffer[CayenneLppCursor++] = channel;
153153
CayenneLppBuffer[CayenneLppCursor++] = LPP_TEMPERATURE;
154154
CayenneLppBuffer[CayenneLppCursor++] = val >> 8;
@@ -165,7 +165,7 @@ uint8_t CayenneLppAddRelativeHumidity( uint8_t channel, float rh )
165165
}
166166
CayenneLppBuffer[CayenneLppCursor++] = channel;
167167
CayenneLppBuffer[CayenneLppCursor++] = LPP_RELATIVE_HUMIDITY;
168-
CayenneLppBuffer[CayenneLppCursor++] = rh * 2;
168+
CayenneLppBuffer[CayenneLppCursor++] = (uint8_t ) ( rh * 2 );
169169

170170
return CayenneLppCursor;
171171
}
@@ -176,9 +176,9 @@ uint8_t CayenneLppAddAccelerometer( uint8_t channel, float x, float y, float z )
176176
{
177177
return 0;
178178
}
179-
int16_t vx = x * 1000;
180-
int16_t vy = y * 1000;
181-
int16_t vz = z * 1000;
179+
int16_t vx = ( int16_t ) ( x * 1000 );
180+
int16_t vy = ( int16_t ) ( y * 1000 );
181+
int16_t vz = ( int16_t ) ( z * 1000 );
182182

183183
CayenneLppBuffer[CayenneLppCursor++] = channel;
184184
CayenneLppBuffer[CayenneLppCursor++] = LPP_ACCELEROMETER;
@@ -198,7 +198,7 @@ uint8_t CayenneLppAddBarometricPressure( uint8_t channel, float hpa )
198198
{
199199
return 0;
200200
}
201-
int16_t val = hpa * 10;
201+
int16_t val = ( int16_t ) ( hpa * 10 );
202202

203203
CayenneLppBuffer[CayenneLppCursor++] = channel;
204204
CayenneLppBuffer[CayenneLppCursor++] = LPP_BAROMETRIC_PRESSURE;
@@ -214,9 +214,9 @@ uint8_t CayenneLppAddGyrometer( uint8_t channel, float x, float y, float z )
214214
{
215215
return 0;
216216
}
217-
int16_t vx = x * 100;
218-
int16_t vy = y * 100;
219-
int16_t vz = z * 100;
217+
int16_t vx = ( int16_t ) ( x * 100 );
218+
int16_t vy = ( int16_t ) ( y * 100 );
219+
int16_t vz = ( int16_t ) ( z * 100 );
220220

221221
CayenneLppBuffer[CayenneLppCursor++] = channel;
222222
CayenneLppBuffer[CayenneLppCursor++] = LPP_GYROMETER;
@@ -236,9 +236,9 @@ uint8_t CayenneLppAddGps( uint8_t channel, float latitude, float longitude, floa
236236
{
237237
return 0;
238238
}
239-
int32_t lat = latitude * 10000;
240-
int32_t lon = longitude * 10000;
241-
int32_t alt = meters * 100;
239+
int32_t lat = ( int32_t ) ( latitude * 10000 );
240+
int32_t lon = ( int32_t ) ( longitude * 10000 );
241+
int32_t alt = ( int32_t ) ( meters * 100 );
242242

243243
CayenneLppBuffer[CayenneLppCursor++] = channel;
244244
CayenneLppBuffer[CayenneLppCursor++] = LPP_GPS;

src/apps/LoRaMac/common/LmHandler/LmHandler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,23 +950,23 @@ static void LmHandlerPackagesNotify( PackageNotifyTypes_t notifyType, void *para
950950
{
951951
if( LmHandlerPackages[i]->OnMcpsConfirmProcess != NULL )
952952
{
953-
LmHandlerPackages[i]->OnMcpsConfirmProcess( params );
953+
LmHandlerPackages[i]->OnMcpsConfirmProcess( ( McpsConfirm_t* ) params );
954954
}
955955
break;
956956
}
957957
case PACKAGE_MCPS_INDICATION:
958958
{
959959
if( LmHandlerPackages[i]->OnMcpsIndicationProcess != NULL )
960960
{
961-
LmHandlerPackages[i]->OnMcpsIndicationProcess( params );
961+
LmHandlerPackages[i]->OnMcpsIndicationProcess( ( McpsIndication_t* )params );
962962
}
963963
break;
964964
}
965965
case PACKAGE_MLME_CONFIRM:
966966
{
967967
if( LmHandlerPackages[i]->OnMlmeConfirmProcess != NULL )
968968
{
969-
LmHandlerPackages[i]->OnMlmeConfirmProcess( params );
969+
LmHandlerPackages[i]->OnMlmeConfirmProcess( ( MlmeConfirm_t* )params );
970970
}
971971
break;
972972
}

src/boards/B-L072Z-LRWAN1/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ list(APPEND ${PROJECT_NAME}_SOURCES
3333
"${CMAKE_CURRENT_SOURCE_DIR}/rtc-board.c"
3434
"${CMAKE_CURRENT_SOURCE_DIR}/spi-board.c"
3535
"${CMAKE_CURRENT_SOURCE_DIR}/sx1276-board.c"
36+
"${CMAKE_CURRENT_SOURCE_DIR}/sysIrqHandlers.c"
3637
"${CMAKE_CURRENT_SOURCE_DIR}/uart-board.c"
37-
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/sysIrqHandlers.c"
3838
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/utilities.c"
3939
"${CMAKE_CURRENT_SOURCE_DIR}/cmsis/arm-gcc/startup_stm32l072xx.s"
4040
"${CMAKE_CURRENT_SOURCE_DIR}/cmsis/system_stm32l0xx.c"

src/boards/B-L072Z-LRWAN1/board.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "i2c.h"
2929
#include "uart.h"
3030
#include "timer.h"
31+
#include "sysIrqHandlers.h"
3132
#include "board-config.h"
3233
#include "lpm-board.h"
3334
#include "rtc-board.h"

src/boards/B-L072Z-LRWAN1/gpio-board.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*/
2323
#include "stm32l0xx.h"
2424
#include "utilities.h"
25+
#include "sysIrqHandlers.h"
2526
#include "board-config.h"
2627
#include "rtc-board.h"
2728
#include "gpio-board.h"

src/boards/B-L072Z-LRWAN1/rtc-board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "timer.h"
3232
#include "systime.h"
3333
#include "gpio.h"
34+
#include "sysIrqHandlers.h"
3435
#include "lpm-board.h"
3536
#include "rtc-board.h"
3637

@@ -464,7 +465,7 @@ void RtcSetMcuWakeUpTime( void )
464465
hit = RtcAlarm.AlarmTime.Seconds +
465466
60 * ( RtcAlarm.AlarmTime.Minutes +
466467
60 * ( RtcAlarm.AlarmTime.Hours +
467-
24 * ( RtcAlarm.AlarmDateWeekDay ) ) );
468+
24 * ( RtcAlarm.AlarmDateWeekDay - 1 ) ) );
468469
hit = ( hit << N_PREDIV_S ) + ( PREDIV_S - RtcAlarm.AlarmTime.SubSeconds );
469470

470471
mcuWakeUpTime = ( int16_t )( ( now - hit ) );

0 commit comments

Comments
 (0)