rfquack / RFQuack

RFQuack: the versatile RF-analysis tool that quacks!
https://rfquack.org
GNU General Public License v2.0
217 stars 32 forks source link

getSyncWord - invalid conversion #30

Closed gigawatts closed 1 year ago

gigawatts commented 1 year ago

Describe the bug

Trying to compile RF Quack for EvilCrowRF v1

Getting the below error

src/radio/RFQCC1101.h: In member function 'virtual int16_t RFQCC1101::getSyncWord(uint8_t*, pb_size_t*)':
src/radio/RFQCC1101.h:103:16: error: invalid conversion from 'int' to 'pb_size_t*' {aka 'short unsigned int*'} [-fpermissive]
         size = 2;
                ^

Which is similar to #2 but that was for setSyncWord function, this is for getSyncWord function, and the workaround listed in that issue did not work for this problem.

To Reproduce

Using a combo of instructions from the following locations:

Expected behavior

Expect firmware to build and flash

Additional info (please complete)

gigawatts commented 1 year ago

Also note that the instructions at the following link don't work, as the freshly built docker image does not have pio installed http://rfquack.org/usage/build/#build-via-docker

Successfully built 29f9cca96499
Successfully tagged rfquack/rfquack:latest

$ make build-in-docker
docker run \
    --rm -it \
    --volume /home/me/Downloads/RFQuack:/tmp/RFQuack rfquack/rfquack \
    make build
pio run
/bin/bash: line 1: pio: command not found
make: *** [Makefile:82: build] Error 127
make: *** [Makefile:69: build-in-docker] Error 2

Edit: Oh, I think it might because you have a hard requirement of python 3.10, but that container image has python 3.9.15 installed

From image build:

$ make docker-build-image
docker build \
    --progress plain \
    -t rfquack/rfquack .
Sending build context to Docker daemon   83.3MB
Step 1/10 : FROM python:3.9-slim
 ---> a612918ff2a3
Step 2/10 : LABEL maintainer "RFQuack"

...

Ignoring pickleshare: markers 'python_version >= "3.10" and python_version < "4.0"' don't match your environment
Ignoring platformio: markers 'python_version >= "3.10" and python_version < "4.0"' don't match your environment
Ignoring prompt-toolkit: markers 'python_version >= "3.10" and python_version < "4.0"' don't match your environment

...

Successfully built 3661da653493
Successfully tagged rfquack/rfquack:latest

$ docker run -it --rm rfquack/rfquack /bin/bash
root@d5b314ddcf39:/tmp/RFQuack# python --version
Python 3.9.15

Yeah, confirmed I can get past at least this error by changing the Dockerfile (submitted PR https://github.com/rfquack/RFQuack/pull/31) to use FROM python:3.10-slim, resulting in a good image with pio and everything else installed. But using make build-in-docker still fails with the original invalid conversion error reported.

phretor commented 1 year ago

Thanks @gigawatts - please have a look at the most recent commit.

gigawatts commented 1 year ago

Working! Thank you!