manio/skymax-demo

plz update (simplify) build instructions :D

Opened this issue · 1 comments

Hello,

thanks for the awesome software work 👯‍♀️

please update build instructions: like this:

# -1) tested on 
hostnamectrl; # Debian GNU/Linux 11 (bullseye)

# 0) have cmake installed
apt update; apt install cmake git build-essential;

# 0.1) version installed
cmake --version
cmake version 3.18.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).

# 1) use https instead of ssh
git clone https://github.com/manio/skymax-demo.git

# 2) go into newly created subdir
cd skymax-demo

# 3) prepare build
cmake .

# output ought to be:

-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/path/where/src/is/skymax-demo

# 4) build
make

Scanning dependencies of target inverter_poller
[ 20%] Building CXX object CMakeFiles/inverter_poller.dir/inputparser.cpp.o
[ 40%] Building CXX object CMakeFiles/inverter_poller.dir/inverter.cpp.o
/home/user/path/where/src/is/skymax-demo/inverter.cpp: In member function ‘bool cInverter::query(const char*, int)’:
/home/user/path/where/src/is/skymax-demo/inverter.cpp:114:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
  114 |         n = read(fd, (void*)buf+i, replysize-i);
      |                      ~~~~~~~~~~^~
[ 60%] Building CXX object CMakeFiles/inverter_poller.dir/main.cpp.o
[ 80%] Building CXX object CMakeFiles/inverter_poller.dir/tools.cpp.o
[100%] Linking CXX executable inverter_poller
[100%] Built target inverter_poller


# 5) run the binary program
./inverter_poller -h

USAGE:  ./inverter_poller <args> [-r <command>], [-h | --help], [-1 | --run-once]

SUPPORTED ARGUMENTS:
          -r <raw-command>      TX 'raw' command to the inverter
          -h | --help           This Help Message
          -1 | --run-once       Runs one iteration on the inverter, and then exits
          -d                    Additional debugging

RAW COMMAND EXAMPLES (see protocol manual for complete list):
Set output source priority  POP00     (Utility first)
                            POP01     (Solar first)
                            POP02     (SBU)
Set charger priority        PCP00     (Utility first)
                            PCP01     (Solar first)
                            PCP02     (Solar and utility)
                            PCP03     (Solar only)
Set other commands          PEa / PDa (Enable/disable buzzer)
                            PEb / PDb (Enable/disable overload bypass)
                            PEj / PDj (Enable/disable power saving)
                            PEu / PDu (Enable/disable overload restart)
                            PEx / PDx (Enable/disable backlight)


PS: Also it would be great to have some examples :D (what do you usually pass the binary arguments to acchieve what?)

manio commented

Thanks, but can you prepare a PR for this?