Skip to content

Commit

Permalink
Merge pull request #552 from DJI-Jerry/OSDK_4.0.1_bugfixs_01
Browse files Browse the repository at this point in the history
Osdk 4.0.1 bugfixs 01
  • Loading branch information
DJI-Jerry authored Jul 1, 2020
2 parents dc731de + 7fdf62b commit 990dc22
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 23 deletions.
43 changes: 29 additions & 14 deletions osdk-core/modules/inc/firewall/osdk_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,36 @@
* Date : 2020-05-07
* OSDK Ver : OSDK 4.0
* */

static const uint8_t s_osdkPolicyFileBinaryArray[] = {
0x68, 0xC9, 0x82, 0xC8, 0x30, 0xE4, 0x1D, 0xE2, 0xD9, 0x4D, 0x0E, 0x60, 0xA5, 0xDA, 0x62, 0xC6, 0x76, 0xAB, 0x68, 0xDF, 0xC3, 0xE9, 0x29, 0xCE, 0xD1, 0x14,
0xA0, 0xC8, 0x11, 0x6A, 0xC4, 0xDC, 0x86, 0x02, 0x4C, 0xDE, 0xBB, 0x77, 0x04, 0x1B, 0x8A, 0x64, 0x54, 0xD1, 0x0C, 0x75, 0x30, 0x68, 0xFB, 0x26, 0x51, 0x0D,
0x82, 0x8C, 0xB1, 0x66, 0x1F, 0x77, 0xFA, 0xA0, 0x31, 0x3F, 0x34, 0xD8, 0x7E, 0x1A, 0xBE, 0x1C, 0xAB, 0x1F, 0x52, 0xF5, 0x10, 0x92, 0x04, 0x09, 0x42, 0xFD,
0x70, 0xB5, 0x6E, 0xE1, 0xB1, 0x62, 0xCB, 0xDB, 0x34, 0x16, 0x1C, 0x70, 0x74, 0xCF, 0xDE, 0xCE, 0x76, 0x68, 0xF8, 0xC7, 0x70, 0xFA, 0xFF, 0x54, 0xDE, 0x55,
0x81, 0x27, 0x54, 0x47, 0x15, 0xFE, 0xD8, 0xB0, 0xDE, 0x07, 0xE7, 0xB5, 0x7C, 0xC9, 0x50, 0xE1, 0xD9, 0x4C, 0xE9, 0xD2, 0x8A, 0x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0x21, 0x00, 0x02, 0x00, 0x05, 0x06, 0x22, 0x01, 0x04, 0x00, 0x01,
0x0E, 0x17, 0x1E, 0x27, 0x24, 0x01, 0x02, 0x00, 0x11, 0x12, 0x32, 0x3C, 0x02,
0x00, 0x00, 0x37, 0x40, 0x49, 0x02, 0x00, 0x00, 0x20, 0x30
};

#endif /* _OSDK_POLICY_H_ */
2 changes: 2 additions & 0 deletions osdk-core/modules/src/mop/dji_mop_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ MopErrCode MopClient::connect(PipelineID id, PipelineType type,
} else {
pipelineMap[id] = p;
}
} else {
p = pipelineMap[id];
}

/*! 2.Do creating */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ E_OsdkStat OsdkSTM32_TaskCreate(T_OsdkTaskHandle *task, void *(*taskFunc)(void *
char taskName[100] = {0};

snprintf(taskName, sizeof(taskName), "Task_%d", taskCnt);
*task = malloc(sizeof(TaskHandle_t));
result = xTaskCreate((TaskFunction_t)taskFunc, taskName, stackSize, arg, 0, *task);
taskCnt++;
if (result != pdTRUE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,23 +689,23 @@ moveByPositionOffset(float xOffsetDesired, float yOffsetDesired,
zOffsetRemaining = zOffsetDesired - localOffset.z;

//! See if we need to modify the setpoint
if (std::abs(xOffsetRemaining) < speedFactor)
if (abs(xOffsetRemaining) < speedFactor)
xCmd = xOffsetRemaining;
if (std::abs(yOffsetRemaining) < speedFactor)
if (abs(yOffsetRemaining) < speedFactor)
yCmd = yOffsetRemaining;

if(v->getFwVersion() == Version::M100_31 &&
std::abs(xOffsetRemaining) < posThresholdInM &&
std::abs(yOffsetRemaining) < posThresholdInM &&
std::abs(yawInRad - yawDesiredRad) < yawThresholdInRad)
abs(xOffsetRemaining) < posThresholdInM &&
abs(yOffsetRemaining) < posThresholdInM &&
abs(yawInRad - yawDesiredRad) < yawThresholdInRad)
{
//! 1. We are within bounds; start incrementing our in-bound counter
withinBoundsCounter += cycleTimeInMs;
}
else if(std::abs(xOffsetRemaining) < posThresholdInM &&
std::abs(yOffsetRemaining) < posThresholdInM &&
std::abs(zOffsetRemaining) < posThresholdInM &&
std::abs(yawInRad - yawDesiredRad) < yawThresholdInRad)
else if(abs(xOffsetRemaining) < posThresholdInM &&
abs(yOffsetRemaining) < posThresholdInM &&
abs(zOffsetRemaining) < posThresholdInM &&
abs(yawInRad - yawDesiredRad) < yawThresholdInRad)
{
//! 1. We are within bounds; start incrementing our in-bound counter
withinBoundsCounter += cycleTimeInMs;
Expand Down

0 comments on commit 990dc22

Please sign in to comment.