Giter VIP home page Giter VIP logo

bob-firmware's Introduction

Bob Firmware

Rewrite of Bob's firmware, using platformIO. The main goal here is to make something simpler, which will hopefully be more reliable and easier to extend.

Known issues with the old firmware:

  • Overuse of single use function calls.
  • Firmware was split into too many modules, which, combined with the single use functions, made it hard to keep track of program flow.
  • Design was generally bad. It included a lot of functions and states for features that would be implemented "eventually".
  • Used both cores. While in theory this allowed it to sample and log concurrently, in practice you can only write to flash while the other core sleeps.
  • The flash write code is pretty grim.

Design of the new firmware:

  • Write individual samples to flash; flash writes are way faster than initially anticipated, so it may be possible to get away with this. It'd nicely sidestep all the issues we've been having with the flash buffer. The problem is that to do this nicely we effectively need to write 2 pages at once. Not sure what the speed hit from this will be, but I'm willing to take a lower sample rate if we actually get data.
  • Use one core; I am clearly not a good enough programmer to effectively use both. This'll also simplify any write buffer code, if we need it.
  • State machine has been reworked:
    • LOG: Logs data while unplugged.
    • DEBUG_LOG: Logs data while plugged in.
    • DEBUG_PRINT: Prints live data to console. Looks cool, but I'm a bit iffy on this one.
    • DATA_OUT: Prints recorded data as CSV.
    • PLUGGED_IN: Listens to commands over USB.

- More states may be added once we actually get some flight data. - State machine has been moved into main. This makes main() a bit big but I'm not sure how else to do it.

Usage

You need to install wizio-pico to build the firmware.

bob-firmware's People

Contributors

protonnumber avatar crazy-ginger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.