Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plz update (simplify) build instructions :D #17

Open
Edgepath opened this issue Mar 21, 2023 · 1 comment
Open

plz update (simplify) build instructions :D #17

Edgepath opened this issue Mar 21, 2023 · 1 comment

Comments

@Edgepath
Copy link

Edgepath commented Mar 21, 2023

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
Copy link
Owner

manio commented Mar 24, 2023

Thanks, but can you prepare a PR for this?

@manio manio mentioned this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants