Skip to content

Commit

Permalink
feat:add necessary print in battery sample
Browse files Browse the repository at this point in the history
OSDK-2360
  • Loading branch information
charles.huang committed Apr 21, 2020
1 parent 509121a commit 172fe8c
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 172fe8c

Please sign in to comment.