Replies: 3 comments 2 replies
-
If this is a line:
#define ENABLE_WIFI 0 // Connect to WiFi
you can't put comments on #define lines. Above #define is "0 //Connect to
WiFi" not 0 as expected.
ignore me if I'm reading the email wrong.
…On Sat, 16 Oct 2021 at 20:15, Grimwig ***@***.***> wrote:
Hi,
I'm hoping that in exchange for flagging a typo, someone can help this
weak programmer to build a binary for the atomic lamp. I've cloned the repo
and changed default_envs in platformio.ini from m5plusdemo to atomlight
then executed PlatformIO,Build. A bunch of libraries are downloaded and the
first hitch is an error due to a typo (I think). After removing the
apostrophe, the compiler throws up number of 'was not declared in this
scope' errors, below. All I'm trying to achieve at this stage is a
successful build for a Heltec or D1 mini board.
Thanks for reading.
In file included from src/main.cpp:152:0:
include/globals.h:316:53: error: token "" is not valid in preprocessor
expressions #define ENABLE_WIFI 0 // Connect to WiFi
^
src/main.cpp:280:13: note: in expansion of macro 'ENABLE_WIFI'
#if ENABLE_WIFI
^
include/globals.h:316:53: error: token "" is not valid in preprocessor
expressions #define ENABLE_WIFI 0 // Connect to WiFi
^
src/main.cpp:304:13: note: in expansion of macro 'ENABLE_WIFI'
#if ENABLE_WIFI
^
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Bose.cpp.o
In file included from src/network.cpp:32:0:
include/globals.h:316:53: error: token "" is not valid in preprocessor
expressions #define ENABLE_WIFI 0 // Connect to WiFi
^
src/network.cpp:146:10: note: in expansion of macro 'ENABLE_WIFI'
#if !ENABLE_WIFI
^
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Carrier.cpp.o
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Coolix.cpp.o
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Corona.cpp.o
In file included from src/audio.cpp:34:0:
include/soundanalyzer.h: In member function 'PeakData
SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in
this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
src/audio.cpp: In member function 'const int*
SampleBuffer::BandCutoffTable(int)':
src/audio.cpp:90:9: error: 'cutOffsBand' was not declared in this scope
return cutOffsBand;
^
src/audio.cpp: In member function 'const float*
SampleBuffer::GetBandScalars(int)':
src/audio.cpp:95:9: error: 'scalarsBand' was not declared in this scope
return scalarsBand;
^
*** [.pio\build\atomlight\src\audio.cpp.o] Error 1
In file included from src/main.cpp:169:0:
include/soundanalyzer.h: In member function 'PeakData
SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in
this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
In file included from include/effects/meteoreffect.h:43:0,
from src/effects.cpp:35:
include/soundanalyzer.h: In member function 'PeakData
SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in
this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
In file included from include/effects/particles.h:44:0,
from include/effects/stareffect.h:46,
from src/effects.cpp:36:
include/effects/faneffects.h: In function 'int GetFanPixelOrder(int,
PixelOrder)':
include/effects/faneffects.h:117:26: error: 'FanPixelsVertical' was not
declared in this scope
return fanBase + ((FanPixelsVertical[fPos] + LED_FAN_OFFSET_BU) %
FAN_SIZE);
^
In file included from src/effects.cpp:43:0:
include/effects/spectrumeffects.h: In member function 'void
VUMeterEffect::DrawVUMeter(int)':
include/effects/spectrumeffects.h:122:13: error: 'M5' was not declared in
this scope
M5.Lcd.fillRect(0, 0, M5.Lcd.width(), 10, BLACK16);
^
In file included from src/effects.cpp:43:0:
include/effects/spectrumeffects.h: In member function 'virtual void
SpectrumAnalyzerEffect::Draw()':
include/effects/spectrumeffects.h:353:17: error: 'M5' was not declared in
this scope
M5.Lcd.fillScreen(BLACK16);
^
include/effects/spectrumeffects.h: In member function 'void
WaveformEffect::DrawSpike(int, double)':
include/effects/spectrumeffects.h:398:26: warning: division by zero
[-Wdiv-by-zero]
int dx = 256 / (MATRIX_HEIGHT / 2);
^
*** [.pio\build\atomlight\src\main.cpp.o] Error 1
src/effects.cpp: At global scope:
src/effects.cpp:383:27: error: 'FanStar' was not declared in this scope
new StarryNightEffect("FanStars", RainbowColors_p, 8.0, 1.0, LINEARBLEND,
80.0, 0, 2.0),
^
src/effects.cpp:383:34: error: template argument 1 is invalid
new StarryNightEffect("FanStars", RainbowColors_p, 8.0, 1.0, LINEARBLEND,
80.0, 0, 2.0),
^
*** [.pio\build\atomlight\src\effects.cpp.o] Error 1
*** [.pio\build\atomlight\src\network.cpp.o] Error 1
===================================================================================================
[FAILED] Took 8.66 seconds
===================================================================================================
Environment Status Duration
------------------------------
atomlight FAILED 00:00:08.665
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVSHCF5YIJY24DTWFMUX3UHHFM7ANCNFSM5GD6BSEA>
.
|
Beta Was this translation helpful? Give feedback.
-
Yeah, I got muddled up. Not sure where I got the no comments on
#defines idea from! I have them in my own code.
…On Sat, 16 Oct 2021 at 21:33, Grimwig ***@***.***> wrote:
Sorry, I think it's the way it was formatted during pasting. It's the stray apostrophe line 316, globals.h
#define ENABLE_WIFI 0 `// Connect to WiFi
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
I only do programming in my spare time and have been off this last week or so. I hope the following helps. I was able to get this to compile but had to make updates as follows: It looks like the following probably needs to be added to the globals.h entry for atomlight. This should address all of the NOISE_FLOOR related errors: I'm guessing line 353 in spectrumeffects will need to be updated with an if statement to evaluate if M5 is used since atomlight utilizes the heltec board. To address the M5 errors I simply commented out this line. FanPixelsVertical was not declared in this scope: looks like one of two things probably needs to happen:
cutOffsBand was not declared in this scope: Kudos to Dave for putting this out there. As I mentioned earlier, I'm a noob when it comes to programming and only get to do this stuff in my spare time. I also have a terrible time learning this sort of thing without a practical project that piques my interest....and this NightDriver code has certainly done that. I'm looking forward to figuring out the socket client piece of this in python with the ultimate goal of having a raspberry pi drive a series of lights & servos for a fabulous front yard display I'll build on every year. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm hoping that in exchange for flagging a typo, someone can help this weak programmer to build a binary for the atomic lamp. I've cloned the repo and changed default_envs in platformio.ini from m5plusdemo to atomlight then executed PlatformIO,Build. A bunch of libraries are downloaded and the first hitch is an error due to a typo (I think). After removing the apostrophe, the compiler throws up number of 'was not declared in this scope' errors, below. All I'm trying to achieve at this stage is a successful build for a Heltec or D1 mini board.
Thanks for reading.
In file included from src/main.cpp:152:0:
include/globals.h:316:53: error: token "
" is not valid in preprocessor expressions #define ENABLE_WIFI 0
// Connect to WiFi^
src/main.cpp:280:13: note: in expansion of macro 'ENABLE_WIFI'
#if ENABLE_WIFI
^
include/globals.h:316:53: error: token "
" is not valid in preprocessor expressions #define ENABLE_WIFI 0
// Connect to WiFi^
src/main.cpp:304:13: note: in expansion of macro 'ENABLE_WIFI'
#if ENABLE_WIFI
^
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Bose.cpp.o
In file included from src/network.cpp:32:0:
include/globals.h:316:53: error: token "
" is not valid in preprocessor expressions #define ENABLE_WIFI 0
// Connect to WiFi^
src/network.cpp:146:10: note: in expansion of macro 'ENABLE_WIFI'
#if !ENABLE_WIFI
^
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Carrier.cpp.o
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Coolix.cpp.o
Compiling .pio\build\atomlight\lib931\IRremoteESP8266\ir_Corona.cpp.o
In file included from src/audio.cpp:34:0:
include/soundanalyzer.h: In member function 'PeakData SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
src/audio.cpp: In member function 'const int* SampleBuffer::BandCutoffTable(int)':
src/audio.cpp:90:9: error: 'cutOffsBand' was not declared in this scope
return cutOffsBand;
^
src/audio.cpp: In member function 'const float* SampleBuffer::GetBandScalars(int)':
src/audio.cpp:95:9: error: 'scalarsBand' was not declared in this scope
return scalarsBand;
^
*** [.pio\build\atomlight\src\audio.cpp.o] Error 1
In file included from src/main.cpp:169:0:
include/soundanalyzer.h: In member function 'PeakData SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
In file included from include/effects/meteoreffect.h:43:0,
from src/effects.cpp:35:
include/soundanalyzer.h: In member function 'PeakData SampleBuffer::ProcessPeaks()':
include/soundanalyzer.h:556:22: error: 'NOISE_FLOOR' was not declared in this scope
allBandsPeak = max(NOISE_FLOOR, allBandsPeak);
^
In file included from include/effects/particles.h:44:0,
from include/effects/stareffect.h:46,
from src/effects.cpp:36:
include/effects/faneffects.h: In function 'int GetFanPixelOrder(int, PixelOrder)':
include/effects/faneffects.h:117:26: error: 'FanPixelsVertical' was not declared in this scope
return fanBase + ((FanPixelsVertical[fPos] + LED_FAN_OFFSET_BU) % FAN_SIZE);
^
In file included from src/effects.cpp:43:0:
include/effects/spectrumeffects.h: In member function 'void VUMeterEffect::DrawVUMeter(int)':
include/effects/spectrumeffects.h:122:13: error: 'M5' was not declared in this scope
M5.Lcd.fillRect(0, 0, M5.Lcd.width(), 10, BLACK16);
^
In file included from src/effects.cpp:43:0:
include/effects/spectrumeffects.h: In member function 'virtual void SpectrumAnalyzerEffect::Draw()':
include/effects/spectrumeffects.h:353:17: error: 'M5' was not declared in this scope
M5.Lcd.fillScreen(BLACK16);
^
include/effects/spectrumeffects.h: In member function 'void WaveformEffect::DrawSpike(int, double)':
include/effects/spectrumeffects.h:398:26: warning: division by zero [-Wdiv-by-zero]
int dx = 256 / (MATRIX_HEIGHT / 2);
^
*** [.pio\build\atomlight\src\main.cpp.o] Error 1
src/effects.cpp: At global scope:
src/effects.cpp:383:27: error: 'FanStar' was not declared in this scope
new StarryNightEffect("FanStars", RainbowColors_p, 8.0, 1.0, LINEARBLEND, 80.0, 0, 2.0),
^
src/effects.cpp:383:34: error: template argument 1 is invalid
new StarryNightEffect("FanStars", RainbowColors_p, 8.0, 1.0, LINEARBLEND, 80.0, 0, 2.0),
^
*** [.pio\build\atomlight\src\effects.cpp.o] Error 1
*** [.pio\build\atomlight\src\network.cpp.o] Error 1
=================================================================================================== [FAILED] Took 8.66 seconds ===================================================================================================
Environment Status Duration
atomlight FAILED 00:00:08.665
Beta Was this translation helpful? Give feedback.
All reactions