|
@@ -453,6 +453,7 @@ void Uart1ReceivedDataProcessCallback (void* arg, SerialProtocolFrameData* spFra
|
|
|
float enocoderXValue = 0;
|
|
|
ReadWordFromBufer (spFrameData->dataBuffer, &inputDataBufferPos, (uint32_t*)&enocoderXValue);
|
|
|
if (osMutexAcquire (sensorsInfoMutex, osWaitForever) == osOK) {
|
|
|
+ sensorsInfo.positionXWeak = 1;
|
|
|
sensorsInfo.positionXOffset = enocoderXValue - sensorsInfo.currentXPosition;
|
|
|
osMutexRelease (sensorsInfoMutex);
|
|
|
respStatus = spOK;
|
|
@@ -464,6 +465,7 @@ void Uart1ReceivedDataProcessCallback (void* arg, SerialProtocolFrameData* spFra
|
|
|
float enocoderYValue = 0;
|
|
|
ReadWordFromBufer (spFrameData->dataBuffer, &inputDataBufferPos, (uint32_t*)&enocoderYValue);
|
|
|
if (osMutexAcquire (sensorsInfoMutex, osWaitForever) == osOK) {
|
|
|
+ sensorsInfo.positionYWeak = 1;
|
|
|
sensorsInfo.positionYOffset = enocoderYValue - sensorsInfo.currentYPosition;
|
|
|
osMutexRelease (sensorsInfoMutex);
|
|
|
respStatus = spOK;
|
|
@@ -522,7 +524,6 @@ void Uart1ReceivedDataProcessCallback (void* arg, SerialProtocolFrameData* spFra
|
|
|
case spSetPositonX:
|
|
|
PositionControlTaskData posXData __attribute__ ((aligned (32))) = { 0 };
|
|
|
if (osMutexAcquire (sensorsInfoMutex, osWaitForever) == osOK) {
|
|
|
- sensorsInfo.positionXWeak = 1;
|
|
|
osMutexRelease (sensorsInfoMutex);
|
|
|
}
|
|
|
if (positionXControlTaskInitArg.positionSettingQueue != NULL)
|
|
@@ -533,7 +534,6 @@ void Uart1ReceivedDataProcessCallback (void* arg, SerialProtocolFrameData* spFra
|
|
|
break;
|
|
|
case spSetPositonY:
|
|
|
if (osMutexAcquire (sensorsInfoMutex, osWaitForever) == osOK) {
|
|
|
- sensorsInfo.positionYWeak = 1;
|
|
|
osMutexRelease (sensorsInfoMutex);
|
|
|
}
|
|
|
PositionControlTaskData posYData __attribute__ ((aligned (32))) = { 0 };
|