Skip to content

Commit 0951eb5

Browse files
committed
remove method from unix emulation that doesn't exist on the real thing
1 parent 5dbf3e7 commit 0951eb5

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

unix/modbadge.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -126,29 +126,6 @@ STATIC mp_obj_t badge_leds_disable_() {
126126
}
127127
STATIC MP_DEFINE_CONST_FUN_OBJ_0(badge_leds_disable_obj, badge_leds_disable_);
128128

129-
130-
STATIC mp_obj_t badge_leds_set_state_(mp_uint_t n_args, const mp_obj_t *args) {
131-
/*
132-
mp_uint_t len;
133-
uint8_t *leds = (uint8_t *)mp_obj_str_get_data(args[0], &len);
134-
return mp_obj_new_int(badge_leds_set_state(leds));
135-
*/
136-
mp_uint_t len;
137-
uint8_t *rgbw = (uint8_t *)mp_obj_str_get_data(args[0], &len);
138-
printf("LEDs: ");
139-
for (int i=5; i>=0; i--) {
140-
uint8_t r = rgbw[i*4+0];
141-
uint8_t g = rgbw[i*4+1];
142-
uint8_t b = rgbw[i*4+2];
143-
printf("\x1b[48;2;%u;%u;%um", r, g, b);
144-
printf("\x1b[38;2;%u;%u;%um", r, g, b);
145-
printf(" \x1b[0m ");
146-
}
147-
printf("\n");
148-
return mp_obj_new_int(0);
149-
}
150-
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(badge_leds_set_state_obj, 1,1 ,badge_leds_set_state_);
151-
152129
STATIC mp_obj_t badge_leds_send_data_(mp_uint_t n_args, const mp_obj_t *args) {
153130
// mp_uint_t len = mp_obj_get_int(args[1]);
154131
// uint8_t *leds = (uint8_t *)mp_obj_str_get_data(args[0], &len);
@@ -209,7 +186,6 @@ STATIC const mp_rom_map_elem_t mock_badge_module_globals_table[] = {
209186
{MP_OBJ_NEW_QSTR(MP_QSTR_leds_enable), (mp_obj_t)&badge_leds_enable_obj},
210187
{MP_OBJ_NEW_QSTR(MP_QSTR_leds_disable), (mp_obj_t)&badge_leds_disable_obj},
211188
{MP_OBJ_NEW_QSTR(MP_QSTR_leds_send_data), (mp_obj_t)&badge_leds_send_data_obj},
212-
{MP_OBJ_NEW_QSTR(MP_QSTR_leds_set_state), (mp_obj_t)&badge_leds_set_state_obj},
213189

214190
{MP_OBJ_NEW_QSTR(MP_QSTR_vibrator_init), (mp_obj_t)&badge_vibrator_init_obj},
215191
{MP_OBJ_NEW_QSTR(MP_QSTR_vibrator_activate), (mp_obj_t)&badge_vibrator_activate_obj},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy