This commit is contained in:
parent
f98396c3fc
commit
8ac0fd9bca
|
@ -121,7 +121,7 @@ static float ptz_hori_pid_calculate(float H_SampSpeed)
|
|||
//е÷ËÙ·½Ê½
|
||||
static void ptz_hori_pid_task()
|
||||
{
|
||||
unsigned int time = 0;
|
||||
// unsigned int time = 0;
|
||||
char i = 0;
|
||||
while(1)
|
||||
{
|
||||
|
@ -550,14 +550,25 @@ static void ptz_hori_pid_task()
|
|||
g_ptz.hori_pid.hall_h2_count +
|
||||
g_ptz.hori_pid.hall_h3_count;
|
||||
|
||||
// static uint32_t timeH, lastTimeH, horiTime;
|
||||
// timeH = OSTimeGet();
|
||||
// horiTime = timeH - lastTimeH;
|
||||
// if (horiTime < 0) {
|
||||
// continue;
|
||||
// }
|
||||
// lastTimeH = timeH;
|
||||
|
||||
if(g_ptz.hori_pid.hall_h123_count >= 2)
|
||||
{
|
||||
g_ptz.hori_pid.hall_h123_motor_speed =
|
||||
60000.0 * (float)(g_ptz.hori_pid.hall_h123_count/* - 1*/) /
|
||||
(float)PTZ_HORI_PID_T / PTZ_HORI_ONE_CYCLE_HALL_NUM;
|
||||
(float)PTZ_HORI_PID_T / PTZ_HORI_ONE_CYCLE_HALL_NUM;
|
||||
// g_ptz.hori_pid.hall_h123_motor_speed =
|
||||
// 60000.0 * (float)(g_ptz.hori_pid.hall_h123_count/* - 1*/) /
|
||||
// (float)horiTime / PTZ_HORI_ONE_CYCLE_HALL_NUM;
|
||||
|
||||
}
|
||||
|
||||
|
||||
g_ptz.hori_motor_speed_hall_actual = g_ptz.hori_pid.hall_h123_motor_speed;
|
||||
|
||||
/* ********************************** */
|
||||
|
@ -767,7 +778,7 @@ static float ptz_vert_pid_calculate(float SampSpeed)
|
|||
//е÷ËÙ·½Ê½
|
||||
static void ptz_vert_pid_task()
|
||||
{
|
||||
unsigned int time = 0;
|
||||
// unsigned int time = 0;
|
||||
char i = 0;
|
||||
while(1)
|
||||
{
|
||||
|
@ -1191,11 +1202,23 @@ static void ptz_vert_pid_task()
|
|||
g_ptz.vert_pid.hall_h2_count +
|
||||
g_ptz.vert_pid.hall_h3_count;
|
||||
|
||||
// static uint32_t timeV, lastTimeV, vertTime;
|
||||
// timeV = OSTimeGet();
|
||||
// vertTime = timeV - lastTimeV;
|
||||
// if (vertTime < 0) {
|
||||
// continue;
|
||||
// }
|
||||
// lastTimeV = timeV;
|
||||
|
||||
if(g_ptz.vert_pid.hall_h123_count >= 2)
|
||||
{
|
||||
g_ptz.vert_pid.hall_h123_motor_speed =
|
||||
60000.0 * (float)(g_ptz.vert_pid.hall_h123_count /*-1*/) /
|
||||
(float)PTZ_VERT_PID_T / PTZ_VERT_ONE_CYCLE_HALL_NUM;
|
||||
|
||||
// g_ptz.vert_pid.hall_h123_motor_speed =
|
||||
// 60000.0 * (float)(g_ptz.vert_pid.hall_h123_count /*-1*/) /
|
||||
// (float)vertTime / PTZ_VERT_ONE_CYCLE_HALL_NUM;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
diff a/APP/Device/Device_speed/speed_to_bldc.c b/APP/Device/Device_speed/speed_to_bldc.c (rejected hunks)
|
||||
@@ -121,7 +121,7 @@
|
||||
//<2F>µ<EFBFBD><C2B5>ٷ<EFBFBD>ʽ
|
||||
static void ptz_hori_pid_task()
|
||||
{
|
||||
- unsigned int time = 0;
|
||||
+// unsigned int time = 0;
|
||||
char i = 0;
|
||||
while(1)
|
||||
{
|
|
@ -74,7 +74,7 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>OGChipSelectEditMenu</name>
|
||||
<state>GD32F450xE GD GD32F450xE</state>
|
||||
<state>GD32F470xE GigaDevice GD32F470xE</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenLowLevelInterface</name>
|
||||
|
@ -120,17 +120,17 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>GFPUDeviceSlave</name>
|
||||
<state>GD32F450xE GD GD32F450xE</state>
|
||||
<state>GD32F470xE GigaDevice GD32F470xE</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FPU2</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>NrRegs</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>NEON</name>
|
||||
|
@ -825,7 +825,7 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFile</name>
|
||||
<state>D:\psx\Pan-Tilt\1.software\HY\6.0 MW22-01A\BSP\IAR\GD32F450xE_APP.icf</state>
|
||||
<state>D:\psx\Pan-Tilt\1.software\HY\6.0 MW22-01A\BSP\IAR\GD32F450xE.icf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFileSlave</name>
|
||||
|
|
Loading…
Reference in New Issue