Skip to content

RevolutionPi/revpi-pitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We have moved to GitLab! Read this for more information.

We have recently moved our repositories to GitLab. You can find revpi-pitest here: https://gitlab.com/revolutionpi/revpi-pitest
All repositories on GitHub will stay up-to-date by being synchronised from GitLab.

We still maintain a presence on GitHub but our work happens over at GitLab. If you want to contribute to any of our projects we would prefer this contribution to happen on GitLab, but we also still accept contributions on GitHub if you prefer that.

piTest

Building

Submodules

This repository uses git submodules. These submodules need to be initialized in order to build piTest.

This can be done by initializing submodules while cloning with

git clone --recurse-submodules https://gitlab.com/revolutionpi/revpi-pitest.git

or afterwards with

git submodule init
git submodule update

Compiling using CMake

These are the instructions to build piTest:

mkdir build && cd build
cmake ..
cmake --build .

Usage

Usage: piTest [OPTION]
- Shows infos from RevPiCore control process
- Reads values of RevPiCore process image
- Writes values to RevPiCore process image

Options:
                 -d: Get device list.

      -v <var_name>: Shows infos for a variable.

                 -1: execute the following read only once.

                 -q: execute the following read quietly, print only the value.

-r <var_name>[,<f>]: Reads value of a variable.
                     <f> defines the format: h for hex, d for decimal (default), b for binary
                     E.g.: -r Input_001,h
                     Read value from variable 'Input_001'.
                     Shows values cyclically every second.
                     Break with Ctrl-C.

   -r <o>,<l>[,<f>]: Reads <l> bytes at offset <o>.
                     <f> defines the format: h for hex, d for decimal (default), b for binary
                     E.g.: -r 1188,16
                     Read 16 bytes at offset 1188.
                     Shows values cyclically every second.
                     Break with Ctrl-C.

  -w <var_name>,<v>: Writes value <v> to variable.
                     E.g.: -w Output_001,23:
                     Write value 23 dez (=17 hex) to variable 'Output_001'.

     -w <o>,<l>,<v>: Writes <l> bytes with value <v> (as hex) to offset <o>.
                     length should be one of 1|2|4.
                     E.g.: -w 0,4,31224205:
                     Write value 31224205 hex (=824328709 dez) to offset 0.

         -g <o>,<b>: Gets bit number <b> (0-7) from byte at offset <o>.
                     E.g.: -b 0,5:
                     Get bit 5 from byte at offset 0.

   -s <o>,<b>,<0|1>: Sets 0|1 to bit <b> (0-7) of byte at offset <o>.
                     E.g.: -b 0,5,1:
                     Set bit 5 to 1 of byte at offset 0.

     -R <addr>,<bs>: Reset counters/encoders in a digital input module like DIO or DI.
                     <addr> is the address of module as displayed with option -d.
                     <bs> is a bitset. If the counter on input pin n must be reset,
                     the n-th bit must be set to 1.
                     E.g.: -R 32,0x0014:
                     Reset the counters on input pin I_3 and I_5.

          -C <addr>: Retrieve RO relay counters
                     <addr> is the address of module as displayed with option -d.

                 -S: Stop/Restart I/O update.

                 -x: Reset piControl process.

                 -l: Wait for reset of piControl process.

                 -f: Update firmware. (see tutorials on website for more info)
                     The option "--module <addr>" can be given before this one to specify the address of the module to update.
                     If the "--module <addr>" is not given before it a module to update will be selected automatically.

    --module <addr>: <addr> specifies the address of the module to use for another option.
                     This options can be used with the "-f" flag to specify a specific module to update.
                     In order for the "-f" flag to recognize the address, this option has to be given directly before it.
                     E.g.: --module 31 -f

  -c <addr>,<c>,<m>,<x>,<y>: Do the calibration. (see tutorials on website for more info)
                     <addr> is the address of module as displayed with option -d.
                     <c> is the bitmap of channels
                     <m> is the mode
                     <x> is the check point on x axix
                     <y> is the check point on y axis

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published