Home › Forums › Drona Aviation – Drone for Education › Code error
Tagged: Error
- This topic has 20 replies, 2 voices, and was last updated 4 years, 10 months ago by Zore.
-
AuthorPosts
-
-
December 26, 2019 at 10:49 am #4357
-
December 26, 2019 at 10:53 am #4359
Please Share your full code file
-
December 26, 2019 at 11:24 am #4362
/*Do not remove the include below*/
#include “PlutoPilot.h”
#include “User.h”
#include “Utils.h”
/*The setup function is called once at Pluto’s hardware startup*/
void plutoInit()
{
/*Add your hardware initialization code here*/ }
/*The function is called once before plutoLoop when you activate Developer Mode*/
void onLoopStart()
{
/*do your one time tasks here*/
LED.flightStatus(DEACTIVATE); /*Disable default Led behavior*/
}/*The loop function is called in an endless loop*/
void plutoLoop()
{
/*Add your repeated code here*/
FlightMode.set(RATE); / *Change flight mode to Rate mode*/
LED.set(RED, ON); LED.set(BLUE, ON); LED.set(GREEN, OFF);
}
/*The function is called once after plutoLoop when you deactivate Developer Mode*/
void onLoopFinish()
{
/*do your cleanup tasks here*/
LED.flightStatus(ACTIVATE); /*Enable default Led behavior*/
}Phone clone :
/*Do not remove the include below*/
#include “PlutoPilot.h” #include “Control.h” #include “User.h” #include “Utils.h” #include “Estimate.h”
int16_t Error=0, PlutoXHeading=0;
/*The setup function is called once at Pluto’s hardware startup*/
void plutoInit()
{
/*Add your hardware initialization code here*/
}
/*The function is called once before plutoLoop when you activate Developer Mode*/
void onLoopStart()
{
/*do your one time tasks here*/
LED.flightStatus(DEACTIVATE); /*disablethedefaultLEDbehavior*/
Error = App.getAppHeading() – Angle.get(AG_YAW);
Monitor.println(“Error is: “, Error); }
/*The loop function is called in an endless loop*/
void plutoLoop()
{
/*Add your repeated code here*/
Monitor.println(“PhoneHeading: “, App.getAppHeading());
PlutoXHeading = App.getAppHeading() – Error; if (PlutoXHeading < 0){
PlutoXHeading+=360;
}
Monitor.println(“PlutoX should turn to “, PlutoXHeading);
DesiredAngle.set(AG_YAW, PlutoXHeading); Monitor.println(“PlutoX is at: “, Angle.get(AG_YAW));
LED.set(RED, ON);
LED.set(GREEN, ON); }
/*The function is called once after plutoLoop when you deactivate Developer Mode*/
void onLoopFinish()
{
/*do your cleanup tasks here*/
LED.flightStatus(ACTIVATE);
/*Enable the default LED behavior*/
} -
December 26, 2019 at 11:30 am #4363
Create new PlutoX project in Cygnus and just replace the code with sample code, it should work directly.
Is there anything your missing, can you describe what steps your following? -
December 26, 2019 at 11:35 am #4364
I tried but not working
-
December 26, 2019 at 11:38 am #4365
Actually i was trying to use the codes from pdf but the api are different in code and in documents
-
December 26, 2019 at 11:43 am #4367
-
December 26, 2019 at 11:53 am #4368
I have those documents already but the problem is the cygnus ide is showing error for user.h and estimate.h(unresolved inclusion)
-
December 26, 2019 at 12:04 pm #4369
are you using Linux or Windows
If Linux make sure you are typing name as it is like “User.h ” it should be “user.h” as it is case sensitive in Linux.
You can find all those header files in your projects “platform” folder. -
December 26, 2019 at 12:08 pm #4370
Windows
-
December 27, 2019 at 5:52 am #4372
Im using windows while using some of libraries like utils.h & estimate.h its showing error
-
December 27, 2019 at 5:52 am #4373
Im using windows ,while using some of libraries as i mentioned earlier its showing error
-
December 27, 2019 at 5:55 am #4375
I attached the screenshot of following
-
December 27, 2019 at 6:15 am #4376
When you are getting those errors, have you build the the project first?
-
December 29, 2019 at 6:11 pm #4380
Yes i did
-
December 30, 2019 at 5:36 am #4381
Which Cygnus version you are using?
-
December 30, 2019 at 6:57 am #4382
1.0.6.201808090838
-
December 30, 2019 at 7:00 am #4383
-
December 30, 2019 at 12:23 pm #4384
Yeah thankyou so much for support it worked 🤘🏻
-
January 3, 2020 at 9:19 am #4400
In sesame code inside pluto loop i have the query about it ,
As why those integers are taken and calculated are they a predefined terms or we can change it as per own -
January 7, 2020 at 5:28 am #4406
Can you specifically which integers you are talking about?
-
-
AuthorPosts
- You must be logged in to reply to this topic.