ZONEONE_SECTION1_END_FIRE compile error
dpackham opened this issue · 7 comments
If I set "ZONEONE_SECTION1_END_FIRE" to 0 I get a compile error. Maybe I just don't understand this var. I only want a fire at the peaks of my roof, not the bottoms.
#if FIRSTZONE_SECTIONS >= 1
#define ZONEONE_SECTION1_START 1 //starting LED for this zone
#define ZONEONE_SECTION1_END 50 //ending LED for this zone
#define ZONEONE_SECTION1_START_FIRE 1 //would you like fire to begin from this point? 0 = no 1 = yes
#define ZONEONE_SECTION1_END_FIRE 1 //would you like fire to begin from this point? 0 = no 1 = yes
#endif
I cannot replicate this error. Can you post the error text?
Set both to 0
#if FIRSTZONE_SECTIONS >= 1
#define ZONEONE_SECTION1_START 1 //starting LED for this zone
#define ZONEONE_SECTION1_END 50 //ending LED for this zone
#define ZONEONE_SECTION1_START_FIRE 0 //would you like fire to begin from this point? 0 = no 1 = yes
#define ZONEONE_SECTION1_END_FIRE 0 //would you like fire to begin from this point? 0 = no 1 = yes
#endif
Error
G:\My Drive\Documents\My Code\HolidayLights2.0\HolidayLights2.1\HolidayLights2.1.ino: In function 'void fire_firstZone_SECTION1()':
HolidayLights2.1:2324:3: error: expected primary-expression before '}' token
}
^
HolidayLights2.1:2324:3: error: expected ';' before '}' token
exit status 1
expected primary-expression before '}' token
I have a HIP that I won't fire at the peak and in the 3rd zone its flat so I don't want any fire at all.
Zone One
start 0
end 1
Zone two
start 1
end 0
Zone three
start 0
end 0
Yeah, I'm aware that the fire is still a bit buggy, but it shouldn't cause compiler errors. That error indicates that there is a missing semicolon somewhere, does a particular line of code turn red (highlighted) when that error pops up?
I was having an issue with the Fire effect. I have two zones on my roof line and wanted fire to work at the beginning and end of both zones. Zone 1 worked with no problems, but zone 2 only displayed fire at the end of the zone and only the first pixel would light up at the beginning of the zone. I went through the code to see if there were any significant differences between Zone 1 Section 1 code and Zone 2 Section 1 code.
I'm not savvy enough to completely understand everything going on in this fire code, but I did find an if statement that was different. Once I made the the change to the Zone 2 Section 1 code to essentially do the same thing as Zone 1 Section 1 is doing, it appears to have resolved the issue. My hunch is that this probably needs to be changed for every zone, but since right now I'm only utilizing 2 zones, I can't verify this.
Here is what I changed. Hope it helps others out.
int thisFlame = ((pixelnumber * firesize)/100);
if(thisFlame <= ZONETWO_SECTION1_END - ZONETWO_SECTION1_START ) /* Edited from original if(thisFlame <= ZONETWO_SECTION1_START && thisFlame <= ZONETWO_SECTION1_END)*/
Fire is now fixed and working on all zones.