SMFSW / Queue

Queue handling library (designed on Arduino)
BSD 3-Clause "New" or "Revised" License
93 stars 20 forks source link

ESP8266 - error: 'Queue' does not name a type #2

Closed SMFSW closed 7 years ago

SMFSW commented 7 years ago

Building with PlatformIO through Deviot for ESP8266.

This is the build error:

/Users/booli/queue_test.ino:52:1: error: 'Queue' does not name a type
Queue sendLogDataQueue(sizeof(Logdata), 24, LIFO, true);
^

Relevant code:

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <SoftwareSerial.h>
#include <TickerScheduler.h>
#include <time.h>
#include <FS.h>
#include <Queue.h>
#include "SimpleTime.h"
#include "config.h"
#include "credentials.h"

// Solar data variables
float solar_yield = 0;
float consumption_yield = 0;
uint32_t aggregate_tick = 0;

typedef struct { 
    uint32_t    solar;
    uint32_t    consumption;
    char        date_hour[10];
} Logdata;

Queue sendLogDataQueue(sizeof(Logdata), 24, LIFO, true);

void setup() { 
   // stuff
}

void loop () { 
  // stuff 
}

It does work when I put the library directly into my project folder an use "Queue.h"

issue added from #1 Request

SMFSW commented 7 years ago

Reported issue #2 not fixed for esp8266

SMFSW commented 7 years ago

NOT WORKING on:

Tested WORKING on: Uno, Nano, Due

I don't know why this particular folder or filename does not work on esp8266. I'll investigate some more before making changes.

SMFSW commented 7 years ago

queue.h already exists in compiler sys includes on ESP8266. changed cpp/h names and updated examples