rabno1

  • *
  • 34
How to build another branch?
« on: April 23, 2016, 09:29:18 pm »
New to all this git stuff. I've managed to setup all the dev tools and build the next branch but now i want to add the dRonin auto tune port. Ive used dRonin autotune and got great results.
The problem is i have now idea what commands i need to do to pull?/clone?/merge? that branch so when i build the GCS and firmware it includes the autotune stuff.

Ive been playing around trying all sorts of commands but getting nowhere fast. Ive done a  "git checkout theothercliff/LP-76_Port_Autotune_from_dRonin"  and built everything after that but nothing seems different in the build.

hwh

  • *
  • 1018
Re: How to build another branch?
« Reply #1 on: April 23, 2016, 09:42:03 pm »
The wiki page https://github.com/librepilot/LibrePilot/wiki/Git-Workflow explains this toward the bottom in the section "reviewing someone else's work".

Essentially:

git fetch https://bitbucket.org/THEIR_USERNAME/librepilot.git <branch_name>
git checkout FETCH_HEAD

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #2 on: April 23, 2016, 09:51:38 pm »
thanks ill give that stuff a read and they commands a try.

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #3 on: April 23, 2016, 10:24:59 pm »
That seemed to work and the firmware built ok but now the gcs wont build (never had a problem before).

Quote
mingw32-make[4]: *** No rule to make target 'C:/msys32/mingw64/bin/libproj-9.dll', needed by 'C:/librepilot/build/librepilot-gcs_release/bin/libproj-9.dll'.  Stop.
mingw32-make[4]: Leaving directory 'C:/librepilot/build/librepilot-gcs_release/src/libs/osgearth'
Makefile:434: recipe for target 'sub-osgearth-make_first-ordered' failed
mingw32-make[3]: *** [sub-osgearth-make_first-ordered] Error 2
mingw32-make[3]: Leaving directory 'C:/librepilot/build/librepilot-gcs_release/src/libs'
Makefile:41: recipe for target 'sub-libs-make_first-ordered' failed
mingw32-make[2]: *** [sub-libs-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/librepilot/build/librepilot-gcs_release/src'
Makefile:40: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make[1]: *** [sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/librepilot/build/librepilot-gcs_release'
Makefile:269: recipe for target 'gcs' failed
mingw32-make: *** [gcs] Error 2

f5soh

  • *****
  • 4572
    • LibrePilot

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #5 on: April 24, 2016, 12:47:12 am »
yes all up to date. I can still build the "next" but when i try to build after the 'git checkout FETCH_HEAD' it fails.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to build another branch?
« Reply #6 on: April 24, 2016, 12:57:07 am »
Which branch do you try to build ?

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #7 on: April 24, 2016, 12:58:01 am »
theothercliff/LP-76_Port_Autotune_from_dRonin

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to build another branch?
« Reply #8 on: April 24, 2016, 12:51:07 pm »
Maybe this branch is not up to date with current Next.

You can try a :
Code: [Select]
git merge next
If no conflicts, this should work.

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #9 on: April 24, 2016, 01:05:19 pm »
there was a conflict
Quote
CONFLICT (content): Merge conflict in flight/modules/Stabilization/innerloop.c
im begining to think this is over my head and i should just stick with dRonin until this has been officially merged with next  :(

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to build another branch?
« Reply #10 on: April 24, 2016, 01:18:24 pm »
If you edit flight/modules/Stabilization/innerloop.c

The conflict is:

Code: [Select]
<<<<<<< destination:137b3b24c158751a7614a12182101c74c39c097b
 static bool measuredDterm_enabled;
=======
#if !defined(PIOS_EXCLUDE_ADVANCED_FEATURES)
static uint32_t systemIdentTimeVal = 0;
#endif /* !defined(PIOS_EXCLUDE_ADVANCED_FEATURES) */

>>>>>>> source:22055cf6c773eb96d115d9c6d053ac29e23535c4

Just replace with:

Code: [Select]
static bool measuredDterm_enabled;

#if !defined(PIOS_EXCLUDE_ADVANCED_FEATURES)
static uint32_t systemIdentTimeVal = 0;
#endif /* !defined(PIOS_EXCLUDE_ADVANCED_FEATURES) */


In fact keep all code and remove "<<<<<<< destination:...." and "=============="

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to build another branch?
« Reply #11 on: April 24, 2016, 01:25:26 pm »
Second conflict with shared/uavobjectdefinition/flightstatus.xml

Code: [Select]
<<<<<<< destination:137b3b24c158751a7614a12182101c74c39c097b
         <field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6,PositionHold,CourseLock,VelocityRoam,HomeLeash,AbsolutePosition,ReturnToBase,Land,PathPlanner,POI,AutoCruise,AutoTakeoff"/>
         <!-- Keep Armed (first pos) and FlightMode (second pos) before this line for OSD compatibility -->
         <field name="AlwaysStabilizeWhenArmed" units="" type="enum" elements="1" options="False,True" defaultvalue="False"/>

=======
        <field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6,PositionHold,CourseLock,VelocityRoam,HomeLeash,AbsolutePosition,ReturnToBase,Land,PathPlanner,POI,AutoCruise,AutoTakeoff,AutoTune"/>
>>>>>>> source:22055cf6c773eb96d115d9c6d053ac29e23535c4

Keep the top/first part and add "Autotune" to the enum list.

Code: [Select]
         <field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6,PositionHold,CourseLock,VelocityRoam,HomeLeash,AbsolutePosition,ReturnToBase,Land,PathPlanner,POI,AutoCruise,AutoTakeoff,AutoTune"/>
         <!-- Keep Armed (first pos) and FlightMode (second pos) before this line for OSD compatibility -->
         <field name="AlwaysStabilizeWhenArmed" units="" type="enum" elements="1" options="False,True" defaultvalue="False"/>

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #12 on: April 24, 2016, 01:47:54 pm »
So i edited those and now im getting
 
Quote
$ git merge next
error: merge is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

Thanks for the help, Im sure you'd all rather noobs would stick the stable builds  :P

rabno1

  • *
  • 34
Re: How to build another branch?
« Reply #13 on: April 24, 2016, 01:51:16 pm »
tried this
Quote
$ git add flight/modules/stabilization/innerloop.c


$ git add shared/uavobjectdefinition/flightstatus.xml
warning: CRLF will be replaced by LF in shared/uavobjectdefinition/flightstatus.xml.
The file will have its original line endings in your working directory.


$ git merge next
error: merge is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: How to build another branch?
« Reply #14 on: April 24, 2016, 02:10:52 pm »
So wait the branch to be updated with next :(