Уменьшил частоту ЦП. Исправил останов двигателей.

This commit is contained in:
Beslan
2022-01-25 17:20:02 +03:00
parent 97fd10d8f8
commit 4775b62379
2 changed files with 83 additions and 90 deletions

View File

@@ -8,16 +8,16 @@
#include "mbed.h"
// Defines
#define EEPROM_Address 0xa0
#define EEPROM_Address 0xa0U
#define EEPROM_NoError 0x00
#define EEPROM_BadAddress 0x01
#define EEPROM_I2cError 0x02
#define EEPROM_ParamError 0x03
#define EEPROM_OutOfRange 0x04
#define EEPROM_MallocError 0x05
#define EEPROM_NoError 0x00U
#define EEPROM_BadAddress 0x01U
#define EEPROM_I2cError 0x02U
#define EEPROM_ParamError 0x03U
#define EEPROM_OutOfRange 0x04U
#define EEPROM_MallocError 0x05U
#define EEPROM_MaxError 6
#define EEPROM_MaxError 6U
static std::string _ErrorMessageEEPROM[EEPROM_MaxError] = {
"",
@@ -33,9 +33,9 @@ static std::string _ErrorMessageEEPROM[EEPROM_MaxError] = {
class EEPROM {
public:
enum TypeEeprom {
T24C01 = 128, T24C02 = 256, T24C04 = 512, T24C08 = 1024, T24C16 = 2048,
T24C32 = 4096, T24C64 = 8192, T24C128 = 16384, T24C256 = 32768,
T24C512 = 65536, T24C1024 = 131072, T24C1025 = 131073
T24C01 = 128U, T24C02 = 256U, T24C04 = 512U, T24C08 = 1024U, T24C16 = 2048U,
T24C32 = 4096U, T24C64 = 8192U, T24C128 = 16384U, T24C256 = 32768U,
T24C512 = 65536U, T24C1024 = 131072U, T24C1025 = 131073U
} Type;
/**
@@ -195,7 +195,7 @@ public:
* @param none
* @return current error message(std::string)
*/
std::string getErrorMessage(void) const {
std::string getErrorMessage() const {
return (_ErrorMessageEEPROM[_errnum]);
}