mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 08:15:17 +03:00
CLI cosmetics
This commit is contained in:
parent
f03837f45d
commit
fa174a8279
1 changed files with 13 additions and 8 deletions
|
@ -203,14 +203,19 @@ int cliReadSD(const char ** argv)
|
||||||
if (res != RES_OK) {
|
if (res != RES_OK) {
|
||||||
serialPrint("disk_read error: %d, sector: %d(%d)", res, startSector, numberOfSectors);
|
serialPrint("disk_read error: %d, sector: %d(%d)", res, startSector, numberOfSectors);
|
||||||
}
|
}
|
||||||
// dump(buffer, 32);
|
#if 0
|
||||||
// // calc checksumm
|
for(uint32_t n=0; n<bufferSectors; ++n) {
|
||||||
// uint32_t summ = 0;
|
dump(buffer + n*512, 32);
|
||||||
// for(int n=0; n<(bufferSectors*512); ++n) {
|
}
|
||||||
// summ += buffer[n];
|
#endif
|
||||||
// }
|
#if 0
|
||||||
// serialPrint("sector %d(%d) checksumm: %u", startSector, numberOfSectors, summ);
|
// calc checksumm
|
||||||
|
uint32_t summ = 0;
|
||||||
|
for(int n=0; n<(bufferSectors*512); ++n) {
|
||||||
|
summ += buffer[n];
|
||||||
|
}
|
||||||
|
serialPrint("sector %d(%d) checksumm: %u", startSector, numberOfSectors, summ);
|
||||||
|
#endif
|
||||||
if (numberOfSectors >= bufferSectors) {
|
if (numberOfSectors >= bufferSectors) {
|
||||||
numberOfSectors -= bufferSectors;
|
numberOfSectors -= bufferSectors;
|
||||||
startSector += bufferSectors;
|
startSector += bufferSectors;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue