Prusa-Firmware/Firmware/util.h
bubnikv 077560ce4c Improvement of baby stepping:
1) Fix of stepper control timing
2) Load / restore baby stepping after 9 point bed leveling using
   the planner instead of the questionable baby stepping routine.

Improvement of the menu system: Use a shared menuData union to preserve
memory. Adaptation of baby stepping and edit menus to menuData.

Improvement of the "Toshiba FlashAir" status display. Don't force IP
address query on each display refresh when in the "Support" menu.

Bugfix of the baby stepping menu: Show the correct value instead
of zero when the baby stepping menu is entered.

New feature: Bed leveling adjustment at left / right / front / rear side.
The bed adjustment feature is accessible from the Settings menu
and as L R F B codes of the G80 code.
2016-08-02 12:19:17 +02:00

36 lines
884 B
C

#ifndef UTIL_H
#define UTIL_H
extern const char* FW_VERSION_STR_P();
// Definition of a firmware flavor numerical values.
enum FirmwareRevisionFlavorType
{
FIRMWARE_REVISION_DEV = 0,
FIRMWARE_REVISION_ALPHA = 1,
FIRMWARE_REVISION_BETA = 2,
FIRMWARE_REVISION_RC,
FIRMWARE_REVISION_RC2,
FIRMWARE_REVISION_RC3,
FIRMWARE_REVISION_RC4,
FIRMWARE_REVISION_RC5,
FIRMWARE_REVISION_RELEASED = 127
};
extern bool show_upgrade_dialog_if_version_newer(const char *version_string);
extern void update_current_firmware_version_to_eeprom();
inline int8_t eeprom_read_int8(unsigned char* addr) {
uint8_t v = eeprom_read_byte(addr);
return *reinterpret_cast<int8_t*>(&v);
}
inline void eeprom_update_int8(unsigned char* addr, int8_t v) {
eeprom_update_byte(addr, *reinterpret_cast<uint8_t*>(&v));
}
#endif /* UTIL_H */