Skip to content

Commit

Permalink
Merge pull request #126 in OS/onboard-sdk from OSDK-2360 to develop
Browse files Browse the repository at this point in the history
* commit '172fe8c78b7843943ea063f52f58e88d2f16271b':
  feat:add necessary print in battery sample
  • Loading branch information
charles.huang committed Apr 23, 2020
2 parents f41b98f + 172fe8c commit 9185c7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Binary file modified osdk-lib/x86/advanced-sensing-2.0.3/lib/libadvanced-sensing.a
Binary file not shown.
2 changes: 1 addition & 1 deletion osdk-lib/x86/osdk-core/inc/dji_vehicle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Vehicle
MFIO* mfio;
MobileDevice* mobileDevice;
MissionManager* missionManager;
#ifdef WAYPT2_CORE
#if defined(__linux__)
WaypointV2MissionOperator* waypointV2Mission;
#endif
HardwareSync* hardSync;
Expand Down
Binary file modified osdk-lib/x86/osdk-core/lib/libdjiosdk-core.a
Binary file not shown.
3 changes: 3 additions & 0 deletions sample/platform/linux/battery/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ int main(int argc, char** argv) {
while(true)
{
vehicle->djiBattery->getBatteryWholeInfo(batteryWholeInfo);
DSTATUS("batteryCapacityPercentage is %ld\n",batteryWholeInfo.batteryCapacityPercentage);
vehicle->djiBattery->getSingleBatteryDynamicInfo(DJIBattery::RequestSmartBatteryIndex::FIRST_SMART_BATTERY, firstBatteryDynamicInfo);
DSTATUS("battery index %d batteryCapacityPercent is %ld\n",firstBatteryDynamicInfo.batteryIndex, firstBatteryDynamicInfo.batteryCapacityPercent);
vehicle->djiBattery->getSingleBatteryDynamicInfo(DJIBattery::RequestSmartBatteryIndex::SECOND_SMART_BATTERY, secondBatteryDynamicInfo);
DSTATUS("battery index %d batteryCapacityPercent is %ld\n",secondBatteryDynamicInfo.batteryIndex, secondBatteryDynamicInfo.batteryCapacityPercent);

OsdkLinux_TaskSleepMs(waitTimeMs);
}
Expand Down

0 comments on commit 9185c7f

Please sign in to comment.