Giter VIP home page Giter VIP logo

canpiwi's Introduction

CANPiWi

Welcome to CANPiWi project.

The MERG-CANPiWi is an application that designed to run on a raspberry pi attached to a CAN module transceiver. The app interfaces the MERG-CANBUS protocol and the JMRI Engine Drive application. It allows the user to drive model rail locomotives using the Engine Drive without the JMRI. The app also works as a CAN to CANGrid format via a tcp connection.

Building the project

Clone the project. If developing in a PC with copy the file /lib/liblog4cpp.a.pc to /lib/liblog4cpp.a If developing in a Raspberry pi with copy the file /lib/liblog4cpp.a.pi to /lib/liblog4cpp.a

Type make all.

Use the script initial_setup.sh to setup the raspberry pi in AP mode and compile the project.

For more information visit [MERG CANPiWi] (http://www.merg.org.uk/merg_wiki/doku.php?id=cbus:canwi)

canpiwi's People

Contributors

amaurial avatar pnbgit avatar

Stargazers

 avatar

Watchers

James Cloos avatar Martin Kirkby avatar  avatar Ian Hogg avatar

Forkers

emthornber

canpiwi's Issues

Reduce Compiler Warnings

tcpClientGridConnect.cpp - attached is a git log -p output for the minor changes I made to reduce the number of compiler warnings from gcc 7.3
a) in canMessage : increase size of string buffer t to 3
b) in Constructor : Initialise msg_processed, msg_received, and running to zero. This still leaves queueReader uninitialised but since that variable is an opaque type there is no solution.

tcpClientGridConnect.gitlog.gz

Make failure - link error

I was getting a linker error in the final compilation stage:

main.o: In function `main':
/home/pi/openbackup/CANPiWi/main.cpp:117: undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::ostream*)'
/home/pi/openbackup/CANPiWi/main.cpp:130: undefined reference to `log4cpp::RollingFileAppender::RollingFileAppender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, unsigned int)'
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'canpi' failed
make: *** [canpi] Error 1

Platform is a brand new Pi Zero W running Stretch:

Linux raspberrypi 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l GNU/Linux

I had to rebuild log4cpp.a from the source archive provided, after which make completed successfully.

./lib directory now contains:

total 8776
drwxr-xr-x  5 pi pi    4096 Oct 14 16:58 .
drwxr-xr-x  6 pi pi    4096 Oct 14 17:18 ..
drwxr-xr-x  3 pi pi    4096 Oct 14 15:57 include
drwxr-xr-x 11 pi pi    4096 Oct 14 15:57 libconfig-1.5
-rw-r--r--  1 pi pi  644432 Oct 14 15:57 libconfig-1.5.tar.gz
-rw-r--r--  1 pi pi  161330 Oct 14 15:57 libconfig.a
-rw-r--r--  1 pi pi  437640 Oct 14 15:57 libconfig++.a
-rw-r--r--  1 pi pi 2767592 Oct 14 17:18 liblog4cpp.a
-rw-r--r--  1 pi pi 2158536 Oct 14 15:57 liblog4cpp.a.pc
-rw-r--r--  1 pi pi 2193406 Oct 14 15:57 liblog4cpp.a.pi
drwxr-xr-x 13 pi pi    4096 Oct 14 17:00 log4cpp
-rw-r--r--  1 pi pi  593348 Oct 14 15:57 log4cpp-1.1.2rc2.tar.gz

Maybe ARM6 v ARM7 ? Or Linux version ?

If you have any questions, ask here or find me as 'sharp5' on the MERG forum.

Regards,

Duncan

Invalid zip

I've tried to download the zip file. The final size is 39KB and my windows 10 PC cannot open it as it is invalid. Can you help>

Turnout command fail

The turnout protocol from ED changed. Need to adjust the TURNOUT_REGEX to cope with the changes. It seems the MT is not being sent.

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.