bring over character set demo
This commit is contained in:
parent
996571967f
commit
3f846ff6b4
@ -31,6 +31,7 @@
|
|||||||
#include "countdown_face.h"
|
#include "countdown_face.h"
|
||||||
#include "fast_stopwatch_face.h"
|
#include "fast_stopwatch_face.h"
|
||||||
#include "sunrise_sunset_face.h"
|
#include "sunrise_sunset_face.h"
|
||||||
|
#include "character_set_face.h"
|
||||||
#include "float_demo_face.h"
|
#include "float_demo_face.h"
|
||||||
#include "voltage_face.h"
|
#include "voltage_face.h"
|
||||||
#include "set_time_face.h"
|
#include "set_time_face.h"
|
||||||
|
|||||||
@ -6,6 +6,7 @@ SRCS += \
|
|||||||
./watch-faces/complication/countdown_face.c \
|
./watch-faces/complication/countdown_face.c \
|
||||||
./watch-faces/complication/fast_stopwatch_face.c \
|
./watch-faces/complication/fast_stopwatch_face.c \
|
||||||
./watch-faces/complication/sunrise_sunset_face.c \
|
./watch-faces/complication/sunrise_sunset_face.c \
|
||||||
|
./watch-faces/demo/character_set_face.c \
|
||||||
./watch-faces/demo/float_demo_face.c \
|
./watch-faces/demo/float_demo_face.c \
|
||||||
./watch-faces/sensor/voltage_face.c \
|
./watch-faces/sensor/voltage_face.c \
|
||||||
./watch-faces/settings/set_time_face.c \
|
./watch-faces/settings/set_time_face.c \
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "character_set_face.h"
|
#include "character_set_face.h"
|
||||||
#include "watch.h"
|
#include "watch.h"
|
||||||
|
#include "watch_common_display.h"
|
||||||
|
|
||||||
void character_set_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
void character_set_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
||||||
(void) watch_face_index;
|
(void) watch_face_index;
|
||||||
@ -47,8 +48,10 @@ bool character_set_face_loop(movement_event_t event, void *context) {
|
|||||||
if (*c & 0x80) *c = ' ';
|
if (*c & 0x80) *c = ' ';
|
||||||
// fall through
|
// fall through
|
||||||
case EVENT_ACTIVATE:
|
case EVENT_ACTIVATE:
|
||||||
sprintf(buf, "%c%c%c%c%c%c%c%c%c%c", *c, *c, *c, *c, *c, *c, *c, *c, *c, *c);
|
sprintf(buf, "%c%c%c%c%c%c", *c, *c, *c, *c, *c, *c);
|
||||||
watch_display_string(buf, 0);
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, buf, buf);
|
||||||
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_RIGHT, buf, buf);
|
||||||
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, buf, buf);
|
||||||
break;
|
break;
|
||||||
case EVENT_TIMEOUT:
|
case EVENT_TIMEOUT:
|
||||||
movement_move_to_face(0);
|
movement_move_to_face(0);
|
||||||
Loading…
x
Reference in New Issue
Block a user