Skip to content

Commit

Permalink
app: Change remote micro:bit icon from heart to smiley face.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Jan 31, 2024
1 parent 98931e3 commit 15622e9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ extern MicroBit uBit;
#define RADIO_REMOTE 1
#define RADIO_BRIDGE 0
#define DEV_MODE 0
#define IMG_RUNNING IMG_HEART
#define IMG_RUNNING IMG_HAPPY
#elif PROJECT_BUILD_TYPE == BUILD_RADIO_REMOTE_DEV
#define RADIO_REMOTE 1
#define RADIO_BRIDGE 0
#define DEV_MODE 1
#define IMG_RUNNING IMG_HEART
#define IMG_RUNNING IMG_HAPPY
#elif PROJECT_BUILD_TYPE == BUILD_RADIO_BRIDGE
#define RADIO_REMOTE 0
#define RADIO_BRIDGE 1
Expand Down
10 changes: 9 additions & 1 deletion source/mb_images.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ static const char * const heart =
"000,000,255,000,000\n";
const MicroBitImage IMG_HEART(heart);

static const char * const happy =
"000,000,000,000,000\n"
"000,255,000,255,000\n"
"000,000,000,000,000\n"
"255,000,000,000,255\n"
"000,255,255,255,000\n";
const MicroBitImage IMG_HAPPY(happy);

static const char * const diamond =
"000,000,255,000,000\n"
"000,255,000,255,000\n"
Expand Down Expand Up @@ -46,4 +54,4 @@ static const char * const empty =
"000,000,000,000,000\n"
"000,000,000,000,000\n"
"000,000,000,000,000\n";
const MicroBitImage IMG_EMPTY(empty);
const MicroBitImage IMG_EMPTY(empty);
1 change: 1 addition & 0 deletions source/mb_images.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "MicroBit.h"

extern const MicroBitImage IMG_HEART;
extern const MicroBitImage IMG_HAPPY;
extern const MicroBitImage IMG_DIAMOND;
extern const MicroBitImage IMG_SQUARE;
extern const MicroBitImage IMG_STAIRS;
Expand Down
2 changes: 1 addition & 1 deletion source/radio_comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void radiotx_mainLoop(uint8_t radio_frequency) {
if (uBit.buttonA.isPressed()) {
broadcast_sensors = !broadcast_sensors;
uBit.display.print(broadcast_sensors ? IMG_RUNNING : IMG_WAITING);
uBit.sleep(200);
uBit.sleep(300);
}
#endif

Expand Down

0 comments on commit 15622e9

Please sign in to comment.