Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Library Manager Installs Wrong Code From GitHub (Read 2186 times)
Brandon L
Newbies
*
Offline


Posts: 8
Location: Texas
Joined: Mar 7th, 2015
Library Manager Installs Wrong Code From GitHub
Jun 28th, 2018 at 10:34pm
Print Post  
Hi Tim,

I am using the Adafruit Huzzah Feather (ESP8266) with their 3.5 TFT.  which uses the HX8357 library.  Everything was fine until I needed a couple more GPIO pins and switched to the Huzzah32 (ESP32).  First time I tried to compile, I got a litany of errors beginning with:

Quote:
"...Adafruit_HX8357.cpp:112:25: error: '_spi' was not declared in this scope

     #define SPI_OBJECT  _spi        ///< Default SPI hardware peripheral"


Since the ESP32 is acknowledged as being in live beta, I thought I might be able to find the, likely small bug in the code.  Instead, I found that line of code to be a complete dead end as it was within this code block:

Code (C++)
Select All
#ifndef ESP32
    #define SPI_OBJECT  SPI         ///< Default SPI hardware peripheral
#else
    #define SPI_OBJECT  _spi        ///< Default SPI hardware peripheral
#endif 



Definitely _spi wasn't being defined from there or the SPI library.  I started thinking maybe there was a conflict between the ESP8266 SPI library and the ESP32 SPI lib, but that also didn't lead anywhere.  
Finally I looked back to that code  block (the source of the problem) and was about to post an issue on GitHub, but just before doing so, I wanted to check version numbers.  Yep both = 1.0.7 check! Since I was there, I decided to just read through the code on Github, and low and behold I found it.  the whole #ifndef block didn't exist.  In its place was the simple definition:

Code (C++)
Select All
#define SPI_OBJECT  SPI 


  
So I went back to the library manager and uninstalled the library, checked that is was removed and reinstalled it.  Same #ifndef block reappeared.  
So I just copied in the gitHub downloaded file in over the installed library files, reloaded the IDE, and was back in business.  My sketch complied and loaded as one would expect.
I have no idea how the library manager works, but I thought you might want to know about this.  Unless I've done something wrong, I don't necessarily need anything.

As always, I appreciate all of your support.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Manager Installs Wrong Code From GitHub
Reply #1 - Jun 29th, 2018 at 11:50am
Print Post  
Hi,

The library paths are provided in the arduino library json that Visual Micro downloads and uses to draw the library manager. When you hover over links in the library manager it shows the paths that will be used to get and store the library.

The libray manager allows you to click the lib name to install the latest or you can expand the library node to see all the versions. When you hover a version that should also show you the paths.

So are the paths correct?
  
Back to top
WWW  
IP Logged
 
Brandon L
Newbies
*
Offline


Posts: 8
Location: Texas
Joined: Mar 7th, 2015
Re: Library Manager Installs Wrong Code From GitHub
Reply #2 - Jul 3rd, 2018 at 2:10am
Print Post  
Yes, in fact I check that when I reinstalled it.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Manager Installs Wrong Code From GitHub
Reply #3 - Jul 7th, 2018 at 1:01am
Print Post  
I suspect I know what is happening. If you expand the library in library manager and click on the specific version you want I expect that would install correctly

The library index has the version listed with 1.02 last, 1.0.1,003,004,005,006,1.0.7, 1.0.2. I expect visual micro is getting confused about which is the latest version when downloading but not on screen.

Will fix for the next release.

Thanks



Code
Select All
  {
      "name": "Adafruit HX8357 Library",
      "version": "1.0.6",
      "author": "Adafruit",
      "maintainer": "Adafruit \u003cinfo@adafruit.com\u003e",
      "sentence": "Adafruit HX8357 3.5\" display library.",
      "paragraph": "Adafruit HX8357 3.5\" display library.",
      "website": "https://github.com/adafruit/Adafruit_HX8357_Library",
      "category": "Display",
      "architectures": [        "*"      ],
      "types": [
        "Recommended"      ],
      "repository": "https://github.com/adafruit/Adafruit_HX8357_Library.git",
      "url": "http://downloads.arduino.cc/libraries/github.com/adafruit/Adafruit_HX8357_Library-1.0.6.zip",
      "archiveFileName": "Adafruit_HX8357_Library-1.0.6.zip",
      "size": 336040,
      "checksum": "SHA-256:9b37f0a6447841bb4a59a3455553dc0f435c267f86ba3fd8f21473e8d92251c1"
    },
    {
      "name": "Adafruit HX8357 Library",
      "version": "1.0.7",
      "author": "Adafruit",
      "maintainer": "Adafruit \u003cinfo@adafruit.com\u003e",
      "sentence": "Adafruit HX8357 3.5\" display library.",
      "paragraph": "Adafruit HX8357 3.5\" display library.",
      "website": "https://github.com/adafruit/Adafruit_HX8357_Library",
      "category": "Display",
      "architectures": [        "*"      ],
      "types": [
        "Recommended"      ],
      "repository": "https://github.com/adafruit/Adafruit_HX8357_Library.git",
      "url": "http://downloads.arduino.cc/libraries/github.com/adafruit/Adafruit_HX8357_Library-1.0.7.zip",
      "archiveFileName": "Adafruit_HX8357_Library-1.0.7.zip",
      "size": 338335,
      "checksum": "SHA-256:dd5eb4dab878f8bb601026ed4b0f4604522f470d0d85d90169c11f48cefd6d2f"
    },
    {
      "name": "Adafruit HX8357 Library",
      "version": "1.0.2",
      "author": "Adafruit",
      "maintainer": "Adafruit \u003cinfo@adafruit.com\u003e",
      "sentence": "Adafruit HX8357 3.5\" display library.",
      "paragraph": "Adafruit HX8357 3.5\" display library.",
      "website": "https://github.com/adafruit/Adafruit_HX8357_Library",
      "category": "Display",
      "architectures": [        "*"      ],
      "types": [
        "Recommended"      ],
      "repository": "https://github.com/adafruit/Adafruit_HX8357_Library.git",
      "url": "http://downloads.arduino.cc/libraries/github.com/adafruit/Adafruit_HX8357_Library-1.0.2.zip",
      "archiveFileName": "Adafruit_HX8357_Library-1.0.2.zip",
      "size": 325044,
      "checksum": "SHA-256:9adb4a924bf54054f86b9085ac9833e7cafcb5655c7658f1caf797a6e24d7144"
    }, 

« Last Edit: Jul 7th, 2018 at 1:04am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint