GithubHelp home page GithubHelp logo

wilds / avrminicopter-avrspi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gregd72002/avrminicopter-avrspi

0.0 2.0 0.0 162 KB

The backend controller for Arduino board

License: MIT License

Makefile 1.82% C 95.68% C++ 1.67% Shell 0.83%

avrminicopter-avrspi's Introduction

AvrMiniCopter-AVRSPI

AVRSPI provides a UNIX SOCKET & UDP service for clients to connect to in order to communicate with the controller (AvrMiniCopter-Arduino). It is mainly used to query current status, issue target position request, forward altitude reading etc.

By default AVRSPI binds to UDP port 1030 and UNIX SOCKET /dev/avrspi

Message structure

Each message is of a fixed length - 4 bytes:

  • control (uint8_t)
  • type (uint8_t)
  • value (int16_t)

Control (for incoming messages):

  • currently only used when using UDP
  • 0: do not remember the client, just process the incoming message
  • 1: remember the client and process the incoming message
  • 2: remember the client and ping back

Control (for outgoing messages):

  • 0: a regular message
  • 1: disconnect request

Type:

  • messages with type 0 will be handled by AVRSPI Values:
    • 0: dummy message
    • 1: reset backend and initiate autoconfig
    • 2: reset backend but do not initiate autoconfig
    • 3: get number of CRC errors for incoming SPI transfers
    • 4: save flight log
  • all other types will be forwarded to the backend; see the backend documentation

UNIX SOCKET

When connecting over UNIX SOCKET the client needs to send the required connection type as the first byte. This is:

  • 0: normal bi-directional connection
  • 1: one-way connection - in this case AVRSPI will not be sending any information back to the client (useful for services like barometer reader and similar)

TODO

  • remove flight log and configurator

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.