Skip to content

Commit

Permalink
Merge branch 'develop' into smsplus64
Browse files Browse the repository at this point in the history
  • Loading branch information
networkfusion authored Nov 22, 2024
2 parents abb1819 + 1eec461 commit c6174fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/menu/views/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "../sound.h"
#include "views.h"

#define MAX(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a > _b ? _a : _b; })
#define MIN(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b ? _a : _b; })
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define CLAMP(x, min, max) (MIN(MAX((x), (min)), (max)))

#define YEAR_MIN 1996
Expand All @@ -27,7 +27,7 @@ static struct tm rtc_tm = {0};
static bool is_editing_mode;
static rtc_field_t editing_field_type;

int wrap( uint16_t val, uint16_t min, uint16_t max ) {
int wrap( int val, uint16_t min, uint16_t max ) {
if( val < min ) return max;
if( val > max ) return min;
return val;
Expand Down

0 comments on commit c6174fd

Please sign in to comment.