Skip to content

fix casesensitive headers and invalid char conversions #4

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hpsaturn
Copy link

@hpsaturn hpsaturn commented Jun 6, 2018

It fixed Invalid conversion from 'const char*' to 'char*' [-fpermissive]

hpsaturn added 4 commits June 6, 2018 12:04
Invalid conversion from 'const char*' to 'char*' [-fpermissive]
PS- Waiting for cmd resp...
PS- Reading Particle Measurements...
@AlexFBP AlexFBP mentioned this pull request Nov 16, 2018
Copy link

@AlexFBP AlexFBP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working. Used in private repo with PlatformIO, with success.

@matthijskooijman
Copy link

matthijskooijman commented Dec 28, 2018

I'm not sure I understand the last commit. It seems to revert the earlier commit, reverting unsigned char back to char. For me (AVR-based Arduino), the last commit breaks compilation again. With d0de9b6 it works, with 0ac58d9 I get:

   hpma115S0.cpp: In member function 'boolean HPMA115S0::ReadParticleMeasurement(unsigned int*, unsigned int*)':
   hpma115S0.cpp:117:42: error: narrowing conversion of '147' from 'int' to 'char' inside { } [-Wnarrowing]
      char cmdBuf[] = {0x68, 0x01, 0x04, 0x93};

(and a few more of the same one)

In any case, this is about binary data, so it would seem sensible to use
unsigned char everywhere rather than char?

@AlexFBP
Copy link

AlexFBP commented Dec 30, 2018

Please check if the hpsaturn fork works for you, @matthijskooijman .

@AlexFBP
Copy link

AlexFBP commented Jan 4, 2019

@hpsaturn may you do a fast forward in your branch fix_esp32? I marked #11 as duplicate... most of comits came from you and I requested you this pull you aplied in your fork haha

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

Successfully merging this pull request may close these issues.

3 participants