Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.85 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.85 KB
  • Shows status of scooter on display.
  • Handles input from following components:
    • Button pad
    • Throttle
    • External light sensor
    • NFC reader
    • Bluetooth

It participates on the can bus, and sends these messages: CAN bus messages > Sent by display unit

The hardware used on this is documented in Display unit hardware, and the pinout in Display unit MCU pinouts

General operation

The default firmware seems to perform the following tasks:

Firmware

The default firmware consists of a bootloader (0..0x8000) and a main application (0x8000..). The bootloader handles the update process (Firmware updates over CAN), the main application reboots when it notices CAN messages initiating an update.

Details of default firmware

It uses segger EMWin for the UI. A global variable is used to determine what the current page is (main dashboard, settings, subsetting page, etc). There are a couple of debug pages that appear unreachable in this firmware [^1](no code path writes to the global with the)[^2]

Values such as the speed, battery level and light level are averaged by recording results in a ring buffer.

It has a table of CAN handlers, and a table of bluetooth handlers.

Images used in the default firmware are stored on a flash chip, when the device wants to draw an image to the display, it streams the image data from the flash to the display.