Перелік невирішених проблем в коді
Цей список містить проблеми, які вже відомі, але ще не вирішені. Він генерується автоматично та вказує на рядки коду, які містять текст «TODO».
Такі проблеми включають в себе відкладені завдання, незавершені функції, недоліки в коді, які потребують уваги, або просто загальні підказки для розробників.
Майте на увазі, що деякі проблеми можуть бути непростими, оскільки навіть сам автор коду не спромігся їх вирішити.
firmware/keira/src/servicemanager.cpp:10
ServiceManager::~ServiceManager() { // TODO: Should never be destroyed }
firmware/keira/src/servicemanager.cpp:14
ServiceManager* ServiceManager::getInstance() { // TODO: Not thread-safe, but is first called in static context before any tasks are created if (instance == NULL) {
firmware/keira/src/appmanager.cpp:13
AppManager::~AppManager() { // TODO: Should never be destroyed }
firmware/keira/src/appmanager.cpp:17
AppManager* AppManager::getInstance() { // TODO: Not thread-safe, but is first called in static context before any tasks are created if (instance == NULL) {
firmware/keira/src/appmanager.cpp:61
// // TODO: We should probably use queues to talk to AppManager and avoid all this mess with RTOS functions being called by gosh knows who. /AD // Anyway - behold: an additional task that will suspend the top app and release the lock when it's done.
firmware/keira/src/apps/wifi_config.cpp:46
static_cast<NetworkService*>(ServiceManager::getInstance()->getService<NetworkService>("network")); // TODO: use dynamic_cast and assert networkService != nullptr
firmware/keira/src/apps/fmanager.h:37
// TODO : Add separate icons to new file types // ICONS: ////////////////////////////////////////////////////
firmware/keira/src/apps/fmanager.cpp:328
fileOptionsMenu.addActivationButton(lilka::Button::B); // Back Button // TODO : add callback based api to lilka:Menu fileOptionsMenu.addItem("Відкрити");
firmware/keira/src/apps/fmanager.cpp:427
for (auto dirEntry : dirContents) { // TODO: check mode, select proper icon if FM_MODE_SELECT and dirEntry in selectedEbtries if (dirEntry.type == FT_DIR) fileListMenu.addItem(dirEntry.name, dirEntry.icon, dirEntry.color);
firmware/keira/src/apps/fmanager.cpp:511
// Check name // TODO: check on invalid characters in user's input if (newName == "" || newName == entry.name) return;
firmware/keira/src/apps/liltracker/i2s_sink.cpp:41
// Deinit I2S (free DMA buffers & uninstall driver) // TODO: Seems like this does not free the DMA buffers and causes a memory leak! if (esp_i2s::i2s_driver_uninstall(esp_i2s::I2S_NUM_0) != ESP_OK) {
firmware/keira/src/apps/liltracker/synth.h:19
float volume; // TODO: Research how effects should generally be handled in NES & 6581, since things seem weird: // some effects are cancelled by others, some are reset by OFF, etc... /AD
firmware/keira/src/apps/liltracker/waveforms.cpp:6
// TODO: Use integers instead of floats for audio samples, time, frequency, amplitude, and phase?
firmware/keira/src/apps/liltracker/effects.cpp:59
// Calculate the depth of vibrato in terms of radians // TODO: This is not really correct: 1 unit of phase is not 1 semitone, but 1 Hz. // So we should convert below value to Hz based on the current frequency of the note.
firmware/keira/src/apps/liltracker/effects.cpp:111
// Clamp the amplitude // TODO: We should probably override the amplitude, and disable this effect if event volume is set in tracker? *amplitude *= fminf(fmaxf(newAmplitude, 0.0f), 1.0f);
firmware/keira/src/apps/liltracker/track.cpp:7
// TODO: Limit page count // TODO: Limit pattern count
firmware/keira/src/apps/liltracker/track.cpp:8
// TODO: Limit page count // TODO: Limit pattern count // TODO: Allow unneeded patterns to be removed somehow
firmware/keira/src/apps/liltracker/track.cpp:9
// TODO: Limit pattern count // TODO: Allow unneeded patterns to be removed somehow
firmware/keira/src/apps/nes/nesapp.cpp:22
nofrendo_main(1, argv); // TODO: Figure out how to terminate the emulator without crashing }
firmware/keira/src/apps/tamagotchi/cpu.c:326
/* Trigger the interrupt (TODO: handle relation register) */ if (state == PIN_STATE_LOW) {
firmware/keira/src/apps/tamagotchi/cpu.c:1991
//io_memory[REG_LCD_CTRL - MEM_IO_ADDR_OFS] = 0x8; // LCD control /* TODO: Input relation register */
firmware/keira/src/apps/tamagotchi/cpu.h:75
/* Pins (TODO: add other pins) */ typedef enum {
firmware/keira/src/apps/mjs/mjsrunner.cpp:28
void* MJSApp::ffi_resolver(void* handle, const char* name) { // TODO: Expose more functions if (strcmp(name, "print") == 0) {
firmware/keira/src/apps/lua/lualilka_util.cpp:21
int lualilka_util_exit(lua_State* L) { longjmp(stopjmp, 32); // TODO: 32 marks an "exit" condition return 0;
firmware/keira/src/apps/lua/lualilka_display.cpp:235
// TODO: Check if crap ain't broken since the user may pass anything here and this often causes core panic if (!lua_islightuserdata(L, -1)) {
firmware/keira/src/apps/lua/luarunner.cpp:263
lua_gc(L, LUA_GCCOLLECT, 0); // TODO: Use LUA_GCSTEP?
firmware/keira/src/apps/lua/luarunner.cpp:268
// Calculate time spent in update & gargage collection // TODO: Split time spent in update, time spent in draw, time spent in GC? uint32_t elapsed = millis() - now;
firmware/keira/src/apps/lua/luarunner.cpp:418
// TODO: This is a temporary fix: https://github.com/espressif/arduino-esp32/issues/9221 lilka::fileutils.isSDAvailable();
firmware/keira/src/apps/lua/luarunner.cpp:461
#ifndef LILKA_NO_LUA luaSetup(lilka::fileutils.getSDRoot().c_str()); // TODO: hard-coded
firmware/keira/src/apps/lua/luarunner.cpp:473
// TODO: This is a temporary fix: https://github.com/espressif/arduino-esp32/issues/9221 lilka::fileutils.initSD();
firmware/keira/src/apps/lua/luarunner.cpp:509
int retCode = luaL_loadstring(L, input.c_str()) || execute(); lua_gc(L, LUA_GCCOLLECT, 0); // TODO: Use LUA_GCSTEP?
firmware/keira/src/apps/modplayer/modplayer.cpp:174
// So we read the file manually and then use AudioFileSourcePROGMEM to feed it to mod. (In ESP32, PROGMEM is an outdated misnomer: it works with RAM too) // TODO: Задокументувати нюанс SPI bus contention між SD та дисплеєм. /AD uint8_t* modFileData = new uint8_t[modSource->getSize()];
firmware/keira/src/apps/demos/letris.cpp:90
bool canMove(int dx, int dy) { // TODO return true;
firmware/keira/src/apps/demos/letris.cpp:291
// Гра закінчилася. Виводимо повідомлення на екран // TODO: FreeRTOS experiment // lilka::ui_alert(canvas, "Game over", "Гру завершено!\nТи намагався. :)");
firmware/keira/src/services/clock.h:5
// TODO: Hardcoded timezone #define MYTZ PSTR("EET-2EEST,M3.5.0/3,M10.5.0/4") // Europe/Kyiv
firmware/keira/src/services/network.cpp:1
firmware/keira/src/services/network.cpp:2
// TODO: Add enable/disable methods instead of deallocating WiFi from apps like LilTracker // TODO: Use the mutex, Luke!
firmware/keira/src/services/network.cpp:26
ipAddr("") { // TODO: Use the mutex, Luke! xSemaphoreGive(mutex);
firmware/keira/src/services/network.cpp:118
// WiFi was deallocated // TODO: This is a crutch to avoid using WiFi after deallocation by apps (e. g. LilTracker). /AD // lilka::serial_log("NetworkService: WiFi deallocated");
firmware/doom/src/i_i2ssound.cpp:138
// Load sound lump byte* data = static_cast<byte*>(W_CacheLumpNum(lump, PU_CACHE)); // TODO - free if (data == NULL) {
firmware/doom/src/i_i2ssound.cpp:175
// TODO: Resample to 11025 if needed? Most sounds are 11025, but not all...
firmware/doom/src/i_i2ssound.cpp:241
// This is done by calculating delay from sample rate & bytes written. // TODO: BTW - ring buffer mixing sucks with variable sample rates... /AD uint64_t delay = written / 2 * 1000 / 11025 / portTICK_PERIOD_MS;
firmware/doom/src/i_i2ssound.cpp:259
static boolean32 I_I2S_SoundIsPlaying(int handle) { return false; // TODO }
firmware/doom/src/i_buzzersound.cpp:185
// Load sound lump byte* data = static_cast<byte*>(W_CacheLumpNum(lump, PU_CACHE)); // TODO - free if (data == NULL) {
firmware/doom/src/i_buzzersound.cpp:220
static boolean32 I_Buzzer_SoundIsPlaying(int handle) { return false; // TODO }
-
default: // TODO: Log warning? xSemaphoreGive(inputMutex);
firmware/doom/src/main.cpp:223
} // D_FreeBuffers(); // TODO - never reached }
firmware/doom/src/main.cpp:239
if (playeringame[consoleplayer]) { // We have a player (TODO: might be demo) const player_t* plyr = &players[consoleplayer];
sdk/lib/lilka/src/lilka.cpp:20
BLE_server.begin(); // TODO: I2S // TODO: Delete Task Watchdog Timer - we'll be running long tasks
sdk/lib/lilka/src/lilka.cpp:21
// TODO: I2S // TODO: Delete Task Watchdog Timer - we'll be running long tasks // TODO: Maybe keep it?
sdk/lib/lilka/src/lilka.cpp:22
// TODO: Delete Task Watchdog Timer - we'll be running long tasks // TODO: Maybe keep it? TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0);
sdk/lib/lilka/src/contrib/LodePNG/lodepng.h:753
unsigned ignore_end; /*ignore issues at end of file if possible (missing IEND chunk, too large chunk, ...)*/ /* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially recoverable errors: srgb rendering intent value, size of content of ancillary chunks, more than 79 characters for some
sdk/lib/lilka/src/contrib/LodePNG/lodepng.h:1189
/* TODO: [.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:93
#else /*LODEPNG_COMPILE_ALLOCATORS*/ /* TODO: support giving additional void* payload to the custom allocators */ void* lodepng_malloc(size_t size);
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:424
/*TODO: this ignores potential out of memory errors*/ #define WRITEBIT(writer, bit){\
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:440
} else { /* TODO: increase output size only once here rather than in each WRITEBIT */ size_t i;
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:452
for(i = 0; i != nbits; ++i) { /* TODO: increase output size only once here rather than in each WRITEBIT */ WRITEBIT(writer, (unsigned char)((value >> (nbits - 1u - i)) & 1u));
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:582
static unsigned reverseBits(unsigned bits, unsigned num) { /*TODO: implement faster lookup table based version when needed*/ unsigned i, result = 0;
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:1213
(10=no endcode, 11=wrong jump outside of tree)*/ /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ ERROR_BREAK(50); /*error, bit pointer jumps past memory*/
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:1332
(10=no endcode, 11=wrong jump outside of tree)*/ /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ ERROR_BREAK(51); /*error, bit pointer jumps past memory*/
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:1447
static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value) { /*binary search (only small gain over linear). TODO: use CPU log2 instruction for getting symbols instead*/ size_t left = 1;
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:1473
size_t pos = values->size; /*TODO: return error when this fails (out of memory)*/ unsigned ok = uivector_resize(values, values->size + 4);
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:1494
/*TODO: do this not only for zeros but for any repeated byte. However for PNG it's always going to be the zeros that dominate, so not important for PNG*/
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:2714
/* TODO: make this faster */ static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) {
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:4357
/*when decoding a new PNG image, make sure all parameters created after previous decoding are reset*/ /* TODO: remove this. One should use a new LodePNGState for new sessions */ lodepng_info_cleanup(info);
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:4375
height = lodepng_read32bitInt(&in[20]); /*TODO: remove the undocumented feature that allows to give null pointers to width or height*/ if(w) *w = width;
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:4735
CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline, move bytes instead of bits or move not at all*/
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:5427
/*TODO: check if this works according to the statement in the documentation: "The converter can convert from grayscale input color type, to 8-bit grayscale or grayscale with alpha"*/
sdk/lib/lilka/src/contrib/LodePNG/lodepng.cpp:6404
auto_convert can't be done in many cases. However, do support a few cases here. TODO: more conversions may be possible, and it may also be possible to get a more appropriate color type out of auto_choose_color if knowledge about sbit is used beforehand
sdk/lib/lilka/src/lilka/serial.h:68
// TODO: replace serial_log/serial_err everywhere on serial.log and serial.err // clang-format off
sdk/lib/lilka/src/lilka/buzzer.cpp:19
void Buzzer::begin() { // TODO: Use ledc? #if LILKA_VERSION < 2
sdk/lib/lilka/src/lilka/buzzer.cpp:261
doom_e1m1, sizeof(doom_e1m1) / sizeof(doom_e1m1[0]), 60 ); // TODO - Should be 160... But note durations seem to be off }
sdk/lib/lilka/src/lilka/board.cpp:41
#elif LILKA_VERSION == 2 // TODO: hardcoded values if (index == 0 || index == 11) {
sdk/lib/lilka/src/lilka/display.cpp:268
Canvas::Canvas(uint16_t x, uint16_t y, uint16_t width, uint16_t height) : Arduino_Canvas(width, height, NULL, x, y, 0) { // TODO: Rotation setFont(u8g2_font_10x20_t_cyrillic);
sdk/lib/lilka/src/lilka/display.cpp:276
int GFX<T>::drawTextAligned(const char* text, int16_t x, int16_t y, Alignment hAlign, Alignment vAlign) { // TODO: WARNING: This will break if we're not using U8g2 fonts. int16_t _x1, _y1;
sdk/lib/lilka/src/lilka/display.cpp:316
) { // TODO: WARNING: This will break if we're not using U8g2 fonts. // U8g2 is a can of worms.
sdk/lib/lilka/src/lilka/multiboot.cpp:67
// since every OTA update is marked as successful, even if we don't mark it as valid // TODO: Maybe it will work with actual Lilka v2? // So here's a workaround: I'm going to set ota0 as active partition anyway, so that we return to main application after next restart.
sdk/lib/lilka/src/lilka/multiboot.cpp:103
// TODO: Use sdcard instead of SD file = fopen(path.c_str(), "r");
sdk/lib/lilka/src/lilka/multiboot.cpp:151
// Remove "/sd" prefix // TODO: Maybe we should use absolute path (including "/sd")? // TODO: Store arg in RAM?
sdk/lib/lilka/src/lilka/multiboot.cpp:152
// TODO: Maybe we should use absolute path (including "/sd")? // TODO: Store arg in RAM? arg = lilka::fileutils.getLocalPathInfo(arg).path;
sdk/lib/lilka/src/lilka/fileutils.cpp:45
SPI2_DEV1_CS, SPI2, LILKA_SD_FREQUENCY, LILKA_SD_ROOT ); // TODO: is 20 MHz OK for all cards? // TODO: is 20 MHz OK for all cards? #else
sdk/lib/lilka/src/lilka/fileutils.cpp:49
LILKA_SDCARD_CS, SPI1, LILKA_SD_FREQUENCY, LILKA_SD_ROOT ); // TODO: is 20 MHz OK for all cards? // TODO: is 20 MHz OK for all cards? #endif
sdk/lib/lilka/src/lilka/resources.h:44
/// /// TODO: Update sdcard/filesystem stuff ///
sdk/lib/lilka/src/lilka/inputdialog.cpp:103
if (state.a.justPressed) { // TODO: Handle key press int16_t key = layerKeys[cy * LILKA_KB_COLS + cx];
sdk/lib/lilka/src/lilka/fileutils.h:122
/// @return шлях // TODO: задокументувати const String getParentDirectory(const String& path);