Code Monkey home page Code Monkey logo

headunit-ui's Introduction

HeadUnit UI (Come discuss about it on our Discord!)

Intro

This is the UI part of a headunit project from OpenLeo, based on python and kivy, it looks like this (low framerate only due to recording in gif):

headunit preview image

Design (and integration in the whole head unit project)

This should be launched last, and ideally (not there yet), it should only interface to the other components of the headunit system, not directly to CAN/VAN and devices. A watchdog system (with the UI sending a heartbeat to the OS) would be ideal, as this could then be used to reload the UI should a crash happen.

The UI is based on a core that is basically the home screen + the app bar + launching apps and giving them context (and ideally, custom widgets to have a coherent style across all apps). All the actual features are in "apps", which are actually python modules.

Apps design rules

  • You can test your apps without launching the whole UI by running the app as a module (eg. with it's __main__.py)
  • You should avoid multiple menus and submenus, keep it simple, it is used while driving!
  • You should only interface with the car and devices thru what the headunit and UI provides. some apps may require direct connection (for example a diagnostics app that would need direct connection to CAN), but if you happens to connect directly to something, it is more likely that the actual need would be to add a component to the head unit OS instead.
  • Dependencies should be self contained, if possible.
  • Two icons are needed: icon.png for the menu and sc_icon.png for the shortcut in app bar

FAQ

  • Why using python and kivy for an embedded project? Because it was the best compromise between being easy to work with, without licencing nightmare, and still being able to work directly on a framebuffer (kivy being SDL2 based, you can run it without X11 or Wayland).
  • Why only the UI? Because it makes the whole head unit more reliable, if the UI crashes, it wouldn't lose CAN frames or the music being played, and the embedded linux can then detect and reload the UI only, which should make it safer as it wouldn't distract as much while driving.
  • Is this PSA/Leo only? Actually, the whole head unit design is made so it should be possible to port it for any other car architecture, even if these aren't the focus of OpenLeo.

TODO

  • Give the apps context so they can interface with the car (can bus for telematics, climate control, and the like)
  • Also give context for the other components of the head unit (music playback, navigation, bluetooth...)
  • Have a basic (eg. turn by turn symbols) navigation
  • Have working apps...
  • Add custom widgets that follow a common OpenLeo design guiderules set
  • Inject constant infos to apps (car make, model, version, etc)

headunit-ui's People

Contributors

prototux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ramonsousap

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.