Skip to content

Commit

Permalink
lib: fix buzzer not stopping after melody ends\nkeira: fix incorrect …
Browse files Browse the repository at this point in the history
…pointer cast
  • Loading branch information
and3rson committed Mar 11, 2024
1 parent 20d8319 commit f6182f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/keira/src/apps/lua/lualilka_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int lualilka_display_drawImage(lua_State* L) {
int lualilka_display_queueDraw(lua_State* L) {
// Get App from registry
lua_getfield(L, LUA_REGISTRYINDEX, "app");
App* app = static_cast<App*>(app);
App* app = static_cast<App*>(lua_touserdata(L, -1));
lua_pop(L, 1);
// Queue draw
app->queueDraw();
Expand Down
3 changes: 3 additions & 0 deletions sdk/lib/lilka/src/lilka/buzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ void Buzzer::melodyTask(void* arg) {
}
xSemaphoreGive(buzzer->buzzerMutex);
vTaskDelay(duration / portTICK_PERIOD_MS);
if (i == buzzer->currentMelodyLength - 1) {
noTone(LILKA_BUZZER);
}
}
buzzer->stop();
}
Expand Down

0 comments on commit f6182f9

Please sign in to comment.