Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Missing #define ARDUINO 10808 logic? #876

Closed
supaplextor opened this issue Jul 29, 2019 · 7 comments
Closed

Missing #define ARDUINO 10808 logic? #876

supaplextor opened this issue Jul 29, 2019 · 7 comments

Comments

@supaplextor
Copy link

Same issue as reported here: #829 (comment)

Without the manual define, the includes don't work.

#define ARDUINO 10808
#include <Arduino.h>
#include <DHTesp.h>

DHTesp dht;

void setup() {
  Serial.begin(115200);
  dht.setup(D5, DHTesp::DHT11);
}

float temp = 0;
float ltemp = 1;

void loop() {
  delay(25);
  temp = dht.getTemperature();

  if ((!isnan(temp)) && (ltemp != temp)) {
    Serial.printf("%0.1f F\n", dht.toFahrenheit(temp));
    Serial.printf("%0.1f humidity\n", dht.getHumidity());
    if (temp != ltemp) {
      ltemp = temp;
    }
  }
}

supaplex@supaplex-N56JR:~$ dpkg -l code-insiders 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  code-insiders  1.37.0-15641 amd64        Code editing. Redefined.

Ubuntu 18.04.2 LTS

@supaplextor
Copy link
Author

supaplex@supaplex-N56JR:~$ dpkg -l code-insiders
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii code-insiders 1.37.0-15650 amd64 Code editing. Redefined.

issue still present in this release.

@zunhu zunhu added the bug label Aug 20, 2019
@supaplextor
Copy link
Author


supaplex@supaplex-N56JR:~$ dpkg -l code-insiders
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                          Version                     Architecture                Description
+++-=============================================-===========================-===========================-===============================================================================================
ii  code-insiders                                 1.38.0-1566539276           amd64                       Code editing. Redefined.


also present

@mikecentola
Copy link

This is still present in the latest release. I too had to add the define.

@elektronikworkshop
Copy link
Contributor

This is due to the improper IntelliSense implementation of vscode-arduino. I'm currently working on this and a beta should be available soon at least for OSX and Linux. Windows will follow.

Anyone interested can track the progress here and I often report progress to issue #438 as well.

Regards
EW

@hellyzh
Copy link
Contributor

hellyzh commented Feb 20, 2020

@mikecentola , have you tried to set "#define ARDUINO 1080 logic" to file "c_cpp_properties.json"?

image

@elektronikworkshop
Copy link
Contributor

elektronikworkshop commented Feb 20, 2020

Hi @mikecentola

if you are on OSX or Linux, you can try my alpha releases which are available since yesterday from here. I'll work on Windows support but this might take some days since I have to convince myself to launch my virtual maching 😉

Feedback appreciated (see the readme in the folder above).

@hellyzh hellyzh removed the bug label Mar 13, 2020
@hellyzh
Copy link
Contributor

hellyzh commented Mar 13, 2020

Close the issue because it doesn't have recent activity. Please feel free to open a new issue if you would like further discussion. Thank you for your contributions.

@hellyzh hellyzh closed this as completed Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants