smartknob/firmware/src
Scott Bezek ae28d523e0
Protobuf serial protocol (#101)
- Firmware
  - Refactor all code to use a log interface rather than `Serial` directly
  - Moved platformio.ini to root, so you can load the entire repo in VS Code and still use platformio
  - Reduced graphic buffer bit depth to 8 bits (short on RAM :( )
  - Implemented threadsafe log interface in interface_task (using a queue for posting log message)
  - Created serial protocol interface and 2 implementations - plaintext (default) and protobuf (selected by sending a NULL byte)
  - Protobuf protocol is roughly the same architecture as Splitflap's:
    - PacketSerial (cobs) framing with NULL delimiters
    - CRC32 checksums for packets
    - nanopb generated code for encoding/decoding (generated firmware code is checked in, since it should change less frequently and this reduces burden to build the project from scratch)
- Software
  - Typescript example host-side code:
    - smartknobjs-proto
      - Autogenerated types/encoding/decoding protobuf code (using protobufjs)
    - smartknobjs
      - Helper library for interfacing the with smartknob via serial/protobuf. Implements basic outgoing queue (with retries and ACK checking) and message callback for responding to messages from the SmartKnob
    - example
      - Basic demo CLI app that uses smartknobjs to connect to the smartknob, send a haptic config, and print state changes and log messages to the console
2022-10-22 17:27:35 -07:00
..
font Demo! 2021-10-24 22:23:05 -07:00
proto_gen Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
serial Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
display_task.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
display_task.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
interface_task.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
interface_task.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
logger.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
main.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
motor_task.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
motor_task.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
mt6701_sensor.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
mt6701_sensor.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
proto_helpers.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
semaphore_guard.h initial checkin 2021-10-22 12:35:39 -07:00
task.h initial checkin 2021-10-22 12:35:39 -07:00
tlv_sensor.cpp Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
tlv_sensor.h Protobuf serial protocol (#101) 2022-10-22 17:27:35 -07:00
util.h Firmware updates - sensors, calibration, View support, etc (#9) 2022-03-10 19:05:49 -08:00