I am trying to compile my code however it will not compile with the following in the sketch
Braces have been moved so that Set_Servos is complete.
I have copy and pasted the problem area into a new sketch. I have not defined anything I know I am not worried about those errors. This code still hangs in the same location as the original. (If you would like the full code I can upload).
I have commented out the problem area so that it compiles as is however if I move the braces and /* down past the next if statement it will hang.
Am I missing something simple? I cant see anything wrong with the above.
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
//For each servo set all Values
void SetServos(){
ReadEEPROM(); //Read the current EEPROM
if(ServoNo == 2){ //Wing Fold Left Servo
UpperLimit = WingFoldLeftUpperTrimValE; //Current EEPROM store location of Upper limit
LowerLimit = WingFoldLeftLowerTrimValE; //Current EEPROM store location of Lower limit
RevVal = WingFoldLeftRevValE; //Current EEPROM store location of Rev value
Speed = WingFoldSpeedValE; //Current EEPROM store location of Speed
ServoNo = 9; //ServoNo for controler
Controller = 40; //Servo controlelr number
}
if(ServoNo == 3){ //Wing Fold Right Servo
UpperLimit = WingFoldRightUpperTrimValE; //Current EEPROM store location of Upper limit
LowerLimit = WingFoldRightLowerTrimValE; //Current EEPROM store location of Lower limit
RevVal = WingFoldRightRevValE; //Current EEPROM store location of Rev value
Speed = WingFoldSpeedValE; //Current EEPROM store location of Speed
ServoNo = 10; //ServoNo for controler
Controller = 40; //Servo controlelr number
}
if(ServoNo == 4){ //Wing Lock Servo
UpperLimit = WingLockUpperTrimValE; //Current EEPROM store location of Upper
LowerLimit = WingLockLowerTrimValE; //Current EEPROM store location of Lower
RevVal = WingFoldLockRevValE; //Current EEPROM store location of Rev vlaue
Speed = WingFoldLockSpeedValE; //Current EEPROM store location of Speed
ServoNo = 11; //ServoNo for controler
Controller = 40; //Servo controlelr number
Times = Wing_LockUnlock_Delay_Time_ValE //Current EEPROM store location of Timed values
}
if(ServoNo == 5){ //Right Gear Servo
UpperLimit = RightGearUpperTrimValE; //Current EEPROM store location of Upper limit
LowerLimit = RightGearLowerTrimValE; //Current EEPROM store location of Lower limit
RevVal = RightGearRevValE; //Current EEPROM store location of Rev value
Speed = RightGearSpeedValE; //Current EEPROM store location of Speed
ServoNo = 8; //ServoNo for controler
Controller = 42; //Servo controlelr number
}
if(ServoNo == 6){ //Left Gear Servo
UpperLimit = LeftGearUpperTrimValE; //Current EEPROM store location of Upper limit
LowerLimit = LeftGearLowerTrimValE; //Current EEPROM store location of Lower limit
RevVal = LeftGearRevValE; //Current EEPROM store location of Rev value
Speed = LeftGearSpeedValE; //Current EEPROM store location of Speed
ServoNo = 7; //ServoNo for controler
Controller = 42; //Servo controlelr number
}
}
septillion - Yes of coarse I have tried it.
I did say I don't care about the errors it throws and ReadEEPROM() not being there does not matter it simply throws another error " 'ReadEEPROM' was not declared in this scope ". The problem isn't that it throws errors, in the full code these errors do not exist. The problem is that it hangs when the second part of the code is uncommented. The whole IDE freezes. Sorry the heading may be a bit misleading however I thought I explained it ok in the comments.
Mark (holmes4) - It is ended the very last line of the second part of the code. As that part of the code is the problem area. And as such is commented out so that the IDE does not freeze when trying to Verify/Compile.
I did!!!!!! and I have done before. Your post is very ambiguous. Just say what you want and stop being a ....... about it.
Code isn't hanging anymore neways. In future don't worry bout replying to my topics.
If you cant be helpful or at least say what you want don't worry about doing anything.
If the full code is what you where after it is in 26 files and is 142KB I was trying to not wast peoples time sifting through code that works when all I had was a problem with the code posted.
If it is about the heading being a bit misleading it still relates. Freezing when compiling still is not compiling.
Sorry for being a ... But the forum rules are there for a reason We want to replicate THE error and that can only be done with the whole code. And if you like, the whole code may be a snippet as long as it compiles/give the same error. Not some random other error because you just copied a part of the code.
And as for the not replying anymore I can't guarantee. I'm simply not going to remember your username....