mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 04:45:17 +03:00
Fixes #3374: added SD card disk cache for Horus
* SIMU_DISKIO option available again * new option DISK_CACHE defaults to ON for Horus * printf("%f") fixed in CLI
This commit is contained in:
parent
ee9bb73ef9
commit
868133371c
14 changed files with 334 additions and 20 deletions
|
@ -27,7 +27,7 @@
|
|||
#define CLI_COMMAND_MAX_LEN 256
|
||||
|
||||
OS_TID cliTaskId;
|
||||
TaskStack<CLI_STACK_SIZE> cliStack;
|
||||
TaskStack<CLI_STACK_SIZE> _ALIGNED(8) cliStack; // stack must be aligned to 8 bytes otherwise printf for %f does not work!
|
||||
Fifo<uint8_t, 256> cliRxFifo;
|
||||
uint8_t cliTracesEnabled = true;
|
||||
// char cliLastLine[CLI_COMMAND_MAX_LEN+1];
|
||||
|
@ -631,6 +631,13 @@ int cliDisplay(const char ** argv)
|
|||
else if (!strcmp(argv[1], "audio")) {
|
||||
printAudioVars();
|
||||
}
|
||||
#if defined(DISK_CACHE)
|
||||
else if (!strcmp(argv[1], "dc")) {
|
||||
DiskCacheStats stats = diskCache.getStats();
|
||||
uint32_t hitRate = diskCache.getHitRate();
|
||||
serialPrint("Disk Cache stats: reads: %u, hits: %u, hit rate: %0.1f%%", (stats.noHits + stats.noMisses), stats.noHits, hitRate/10.0);
|
||||
}
|
||||
#endif
|
||||
else if (toLongLongInt(argv, 1, &address) > 0) {
|
||||
int size = 256;
|
||||
if (toInt(argv, 2, &size) >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue