// TODO Either fix lighting or just give up void draw_object_with_lighting(object_t* o, uint32_t x, uint32_t y) { if(is_lit(o)) { draw_object(o, x, y); } }
void next() { if ( token != EOL ) { yytext = getchar(); // next char from stdin if ((yytext == EOL) || (yytext == EQ) || (yytext == QMARK) || (yytext == AND) || (yytext == OR) || (yytext == XOR) || (yytext == NOT) || (yytext == LP) || (yytext == RP) || (yytext == T) || (yytext == F)) { token = yytext; } else if (is_lit(yytext)) { token = LIT; } else if (yytext == ' ') { next(); } else { printf("Unexpected character: %c\n", yytext); next(); } } }
static int set_light_notifications(struct light_device_t* dev, struct light_state_t const* state) { if(is_lit(state) && state->flashOnMS) { write_int(MAIL_LED_FILE, 1); write_int("/data/system/mail_led", 1); } else { write_int(MAIL_LED_FILE, 0); write_int("/data/system/mail_led", 0); } LOGE("Notification led: %p(%d,%d,%d)\n", state->color, state->flashMode, state->flashOnMS, state->flashOffMS); return 0; }