Philipp Hinz 83d1793a91 Added deploy script and enabled build counter há 8 anos atrás
..
.settings 8f3fad20fb Made the project compile again há 9 anos atrás
Release 8f3fad20fb Made the project compile again há 9 anos atrás
sqlite 8f3fad20fb Made the project compile again há 9 anos atrás
.cproject 5db2fcd54e first tries to get the LCD working há 9 anos atrás
.gitignore 8f3fad20fb Made the project compile again há 9 anos atrás
.project 8f3fad20fb Made the project compile again há 9 anos atrás
README.md 8f3fad20fb Made the project compile again há 9 anos atrás
buildno 83d1793a91 Added deploy script and enabled build counter há 8 anos atrás
crc.cpp 8f3fad20fb Made the project compile again há 9 anos atrás
crc.h 8f3fad20fb Made the project compile again há 9 anos atrás
database.cpp 8f3fad20fb Made the project compile again há 9 anos atrás
database.h 8f3fad20fb Made the project compile again há 9 anos atrás
deploy 83d1793a91 Added deploy script and enabled build counter há 8 anos atrás
doxy.cfg 8f3fad20fb Made the project compile again há 9 anos atrás
gendoc 8f3fad20fb Made the project compile again há 9 anos atrás
global.h 2545943990 Display now shows time in bottom line há 8 anos atrás
hal.cpp 6835f0ec0e Implemented flow sensor, some HAL testing há 8 anos atrás
hal.h 6835f0ec0e Implemented flow sensor, some HAL testing há 8 anos atrás
lcd.cpp fa0e109122 made LCD library threadsafe há 8 anos atrás
lcd.h 5db2fcd54e first tries to get the LCD working há 9 anos atrás
led.cpp 8f3fad20fb Made the project compile again há 9 anos atrás
led.h 8f3fad20fb Made the project compile again há 9 anos atrás
logger.cpp 8f3fad20fb Made the project compile again há 9 anos atrás
logger.h 8f3fad20fb Made the project compile again há 9 anos atrás
main.cpp 2545943990 Display now shows time in bottom line há 8 anos atrás
makefile.targets 8f3fad20fb Made the project compile again há 9 anos atrás
spi.cpp 5db2fcd54e first tries to get the LCD working há 9 anos atrás
spi.h 5db2fcd54e first tries to get the LCD working há 9 anos atrás
timer.cpp 8f3fad20fb Made the project compile again há 9 anos atrás
timer.h 8f3fad20fb Made the project compile again há 9 anos atrás

README.md

Speedmanager Readme

Requirements: wiringpi

Usage Speedmanager

~$ ./speedmanager -h
Speedmanager for Raspberry Pi by Philipp Hinz - Build number 921 short GUID 0x3c0
Usage: /opt/hinz-ba-can/code/Pi code/Debug/speedmanager [-hvVteilfads] [-r ohms]
        -h              Prints this help
        -v              Sets verbose output, can be used multiple times
        -r ohms         Sets the start resistance of the digital potentiometer
        -V              Prints only the version and exits
        -t              Terminates the CAN Bus with a connected DiPoti
        -e              Echoes all incoming CAN messages (Debugging)
        -i              Increases the Wiper of the DigiPot every second
        -l              Sets the MCP2515 to listen only mode on shutdown
        -f              Forces a speedtest after startup
        -s              Suppress a speedtest in case of errors
        -a              Add new nodes if not known in file nodes
        -d              Prints a timestamp in front of every message
Listening to the following signals:
        SIGUSR1(10)     Prints monitor data of all nodes
        SIGHUP(1)       Runs a speedtest starting at default speed

Debug levels:

  1. Basic debugging, process informations
  2. CAN messages
  3. CAN speedchanges
  4. SQL querys
  5. CAN error states
  6. SPI communication

Usage canspeed

This helper programm outputs the register configuration for different CAN controllers. So far supported: MCP2510/15 and AT90CAN.

~$ ./canspeed -h
Usage: /opt/hinz-ba-can/code/Pi code/Debug/canspeed -c Clockspeed -t Type [-ro] [-b Baudrate] [-q #TQ]
        -h              Prints this help
        -c              Cockspeed in MHz, 16 MHz recommended
        -t              CAN controller type (1 - MCP2510/15, 2 - AT90CAN)
        -b              Calculate settings for a single baudrate in bit/s
        -q              Number of TQ per bit, default is 16
        -r              Output register settings (use without -o)
        -o              Output the constant definitions for the controller
Example: ./canspeed -c 16 -t 1 -o

Sourcecode

The program source is distributed between multiple files. Please refer to the documentation of the files for their content. The project is written in C++11 in Ecplise under a cross compiler environment. See Makefiles in Debug/ for cross compiler makefiles. See Release/ for Makefiles for Raspberry Pi.

For compiling on Raspberry Pi 2:

cd Release
make all -j 4

(-j 4 runs make with up to 4 threads)