Code error

Tagged: 

Viewing 20 reply threads
  • Author
    Posts
    • #4357
      Siddchafe
      Participant

        `I was trying to use some of code from pdf but it shows error where can i find those libraries ie. user.h , utils.h,estimate.h

        • This topic was modified 4 years, 10 months ago by Siddchafe.
      • #4359
        Zore
        Participant

          Please Share your full code file

        • #4362
          Siddchafe
          Participant

            /*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*/
            }

          • #4363
            Zore
            Participant

              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?

            • #4364
              Siddchafe
              Participant

                I tried but not working

              • #4365
                Siddchafe
                Participant

                  Actually i was trying to use the codes from pdf but the api are different in code and in documents

                • #4367
                  Zore
                  Participant
                  • #4368
                    Siddchafe
                    Participant

                      I have those documents already but the problem is the cygnus ide is showing error for user.h and estimate.h(unresolved inclusion)

                    • #4369
                      Zore
                      Participant

                        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.

                      • #4370
                        Siddchafe
                        Participant

                          Windows

                        • #4372
                          Siddchafe
                          Participant

                            Im using windows while using some of libraries like utils.h & estimate.h its showing error

                          • #4373
                            Siddchafe
                            Participant

                              Im using windows ,while using some of libraries as i mentioned earlier its showing error

                            • #4375
                              Siddchafe
                              Participant

                                I attached the screenshot of following

                              • #4376
                                Zore
                                Participant

                                  When you are getting those errors, have you build the the project first?

                                • #4380
                                  Siddchafe
                                  Participant

                                    Yes i did

                                  • #4381
                                    Zore
                                    Participant

                                      Which Cygnus version you are using?

                                    • #4382
                                      Siddchafe
                                      Participant

                                        1.0.6.201808090838

                                      • #4383
                                        Zore
                                        Participant

                                          Oh that’s the issue, download the latest Cygnus from this link
                                          this should solve the problem

                                        • #4384
                                          Siddchafe
                                          Participant

                                            Yeah thankyou so much for support it worked 🤘🏻

                                          • #4400
                                            Siddchafe
                                            Participant

                                              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

                                            • #4406
                                              Zore
                                              Participant

                                                Can you specifically which integers you are talking about?

                                            Viewing 20 reply threads
                                            • You must be logged in to reply to this topic.