Skip to content

Commit

Permalink
labs(x) macro #32
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Apr 16, 2023
1 parent 200a2ff commit 815eb23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions TM1637TinyDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern "C" {
#include <TM1637TinyDisplay.h>
#include <Arduino.h>

#define labs(x) ((x)>0?(x):-(x))

//
// A
Expand Down
2 changes: 2 additions & 0 deletions TM1637TinyDisplay6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ extern "C" {
#include <TM1637TinyDisplay6.h>
#include <Arduino.h>

#define labs(x) ((x)>0?(x):-(x))

// Digit sequence map for 6 digit displays
const uint8_t digitmap[] = { 2, 1, 0, 5, 4, 3 };

Expand Down

0 comments on commit 815eb23

Please sign in to comment.