mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-12-16 01:09:57 +00:00
programm works
This commit is contained in:
@ -46,8 +46,8 @@ MemoryStatus EEPROM_INIT() {
|
||||
infoBlock.hwInfo.servos[SERVO_VERTICAL].def = 90;
|
||||
infoBlock.hwInfo.servos[SERVO_VERTICAL].max = 180;
|
||||
|
||||
infoBlock.statInfo.totalShots = 0;
|
||||
infoBlock.statInfo.totalPrograms = 0;
|
||||
infoBlock.statInfo.shotsInShot = 0;
|
||||
infoBlock.statInfo.shotsInProgram = 0;
|
||||
infoBlock.statInfo.totalMacros = 0;
|
||||
|
||||
status = saveInfoBlock(&infoBlock);
|
||||
@ -112,11 +112,11 @@ MemoryStatus EEPROM_INIT() {
|
||||
CDC_Transmit_FS((uint8_t*) buffer, strlen(buffer));
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "Total Shots: %lu\n",
|
||||
infoBlock.statInfo.totalShots);
|
||||
infoBlock.statInfo.shotsInShot);
|
||||
CDC_Transmit_FS((uint8_t*) buffer, strlen(buffer));
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "Total Programs: %lu\n",
|
||||
infoBlock.statInfo.totalPrograms);
|
||||
infoBlock.statInfo.shotsInProgram);
|
||||
CDC_Transmit_FS((uint8_t*) buffer, strlen(buffer));
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "Total Macros: %lu\n\n",
|
||||
@ -263,7 +263,7 @@ MemoryStatus EEPROM_EARSE() {
|
||||
uint16_t old_addr = 0;
|
||||
do {
|
||||
uint8_t Buf[255];
|
||||
memset(Buf, 0xFF, sizeof(Buf));
|
||||
memset(Buf, 0x00, sizeof(Buf));
|
||||
FLASH_WriteBlock(addr, 0, Buf, sizeof(Buf), sizeof(Buf));
|
||||
old_addr = addr;
|
||||
addr += sizeof(Buf);
|
||||
|
||||
Reference in New Issue
Block a user