Coder Social home page Coder Social logo

hyp-ed / hyped-2018 Goto Github PK

View Code? Open in Web Editor NEW
15.0 9.0 2.0 92.17 MB

SpaceX Hyperloop Pod Competition 2018

Home Page: https://hyp-ed.com

License: Apache License 2.0

C++ 96.40% Makefile 0.45% Python 2.61% Shell 0.51% Dockerfile 0.04%
hyperloop spacex

hyped-2018's Issues

Run length is not initialised

  • Communication module does not initialise Communications.run_length in the shared data structure
    note, units should be the same as for Navigation.distance
  • State module uses the uninitialised value of Communications.run_length
    add check the data has been initialised
    add code getting new updated data

test:
start up the system, it should not go straight to FailureStopped due to checkNavigation()

Fix warnings

Someone please fix these compiler warnings:

src/utils/io/i2c.cpp: In member function ‘void hyped::utils::io::I2C::read(uint32_t, uint8_t*, uint16_t)’:
src/utils/io/i2c.cpp:94:7: warning: unused variable ‘ret’ [-Wunused-variable]
   int ret = i2c::readHelper(fd_, rx, len);
       ^

src/utils/io/i2c.cpp: In member function ‘void hyped::utils::io::I2C::write(uint32_t, uint8_t*, uint16_t)’:
src/utils/io/i2c.cpp:106:7: warning: unused variable ‘ret’ [-Wunused-variable]
   int ret = i2c::writeHelper(fd_, tx, len);
       ^

Add C++ standard to Makefile

We need to specify the compilation flag for C++ standard in the Makefile. Currently we need at least C++11 (for the data exchange class).

Should we add some other flags as well (e.g. -Wall, -O3)?

State machine accesses shared data before initialisation

State machine should not access anything other than module_status in kIdle state (until all the modules indicate they have been initialised). For example here it accesses nav data as well as comms run_length.

More generally, it might be a good idea to restructure the code so that the checks performed depend on current state since many checks are irrelevant in many states.

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.