|
@@ -263,8 +263,8 @@ void ExecSend()
|
|
xraw.set_bext(false);
|
|
xraw.set_bext(false);
|
|
xraw.set_bremote(false);
|
|
xraw.set_bremote(false);
|
|
xraw.set_len(24);
|
|
xraw.set_len(24);
|
|
- // iv::can::canraw * pxraw195 = xmsg.add_rawmsg();
|
|
|
|
- // pxraw195->CopyFrom(xraw);
|
|
|
|
|
|
+ iv::can::canraw * pxraw195 = xmsg.add_rawmsg();
|
|
|
|
+ pxraw195->CopyFrom(xraw);
|
|
// qDebug(" 0x144: %02X %02X %02X %02X %02X %02X %02X %02X",byte_144[0],byte_144[1],byte_144[2],byte_144[3],
|
|
// qDebug(" 0x144: %02X %02X %02X %02X %02X %02X %02X %02X",byte_144[0],byte_144[1],byte_144[2],byte_144[3],
|
|
// byte_144[4],byte_144[5],byte_144[6],byte_144[7]);
|
|
// byte_144[4],byte_144[5],byte_144[6],byte_144[7]);
|
|
xmsg.set_channel(0);
|
|
xmsg.set_channel(0);
|
|
@@ -276,8 +276,8 @@ void ExecSend()
|
|
xraw.set_bremote(false);
|
|
xraw.set_bremote(false);
|
|
xraw.set_len(24);
|
|
xraw.set_len(24);
|
|
xmsg.set_channel(0);
|
|
xmsg.set_channel(0);
|
|
- iv::can::canraw * pxraw1BC = xmsg.add_rawmsg();
|
|
|
|
- pxraw1BC->CopyFrom(xraw);
|
|
|
|
|
|
+ // iv::can::canraw * pxraw1BC = xmsg.add_rawmsg();
|
|
|
|
+// pxraw1BC->CopyFrom(xraw);
|
|
|
|
|
|
xraw.set_id(0x159);
|
|
xraw.set_id(0x159);
|
|
xraw.set_data(ADS_ONEBOX_1,24);
|
|
xraw.set_data(ADS_ONEBOX_1,24);
|
|
@@ -323,6 +323,26 @@ void initial()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void SendEPS3()
|
|
|
|
+{
|
|
|
|
+ static int rollcouter = 0;
|
|
|
|
+ gpsterraes->GetEPS3Data(ADS_EPS_3);
|
|
|
|
+ ExecSend();
|
|
|
|
+ rollcouter++;
|
|
|
|
+ if(rollcouter>14)rollcouter = 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void SendEPS1()
|
|
|
|
+{
|
|
|
|
+ static int rollcouter = 0;
|
|
|
|
+ set_EPS1_signal("ADS_1_RollgCntr1",rollcouter);
|
|
|
|
+ set_EPS1_signal("ADS_1_Resd1",0.0);
|
|
|
|
+ gpsterraes->GetEPS3Data(ADS_EPS_1);
|
|
|
|
+ ExecSend();
|
|
|
|
+ rollcouter++;
|
|
|
|
+ if(rollcouter>14)rollcouter = 0;
|
|
|
|
+}
|
|
|
|
+
|
|
void testes()
|
|
void testes()
|
|
{
|
|
{
|
|
int i = 0;
|
|
int i = 0;
|
|
@@ -333,7 +353,7 @@ void testes()
|
|
set_EPS1_signal("ADS_1_Resd1",0.0);
|
|
set_EPS1_signal("ADS_1_Resd1",0.0);
|
|
set_EPS1_signal("ADS_1_SteerAgReq",fwheelang);
|
|
set_EPS1_signal("ADS_1_SteerAgReq",fwheelang);
|
|
set_EPS1_signal("ADS_1_SteerAgVld",1.0);
|
|
set_EPS1_signal("ADS_1_SteerAgVld",1.0);
|
|
- set_EPS1_signal("ADS_1_SteerPilotAgEna",2.0);
|
|
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerPilotAgEna",0.0);
|
|
set_EPS1_signal("ADS_1_RollgCntr2",rollcouter);
|
|
set_EPS1_signal("ADS_1_RollgCntr2",rollcouter);
|
|
set_EPS1_signal("ADS_1_Resd2",0.0);
|
|
set_EPS1_signal("ADS_1_Resd2",0.0);
|
|
set_EPS1_signal("ADS_1_SteerTqEna",1.0);
|
|
set_EPS1_signal("ADS_1_SteerTqEna",1.0);
|
|
@@ -357,45 +377,33 @@ void testes()
|
|
|
|
|
|
for(i=0;i<10;i++)
|
|
for(i=0;i<10;i++)
|
|
{
|
|
{
|
|
- set_EPS3_signal("ADS_3_SteerParkAgEna",0.0);
|
|
|
|
- gpsterraes->GetEPS3Data(ADS_EPS_3);
|
|
|
|
- ExecSend();
|
|
|
|
- rollcouter++;
|
|
|
|
- if(rollcouter>14)rollcouter = 0;
|
|
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerPilotAgEna",0.0);
|
|
|
|
+ SendEPS1();
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
}
|
|
}
|
|
|
|
|
|
- for(i=0;i<10;i++)
|
|
|
|
- {
|
|
|
|
- set_EPS3_signal("ADS_3_SteerParkAgEna",1.0);
|
|
|
|
- set_EPS3_signal("ADS_3_SteerParkAgReq",0.0);
|
|
|
|
- set_EPS3_signal("ADS_3_SteerParkAgVld",0.0);
|
|
|
|
- gpsterraes->GetEPS3Data(ADS_EPS_3);
|
|
|
|
- ExecSend();
|
|
|
|
- rollcouter++;
|
|
|
|
- if(rollcouter>14)rollcouter = 0;
|
|
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
|
|
- }
|
|
|
|
|
|
+ // for(i=0;i<10;i++)
|
|
|
|
+ // {
|
|
|
|
+ // set_EPS3_signal("ADS_3_SteerParkAgEna",1.0);
|
|
|
|
+ // set_EPS3_signal("ADS_3_SteerParkAgReq",0.0);
|
|
|
|
+ // set_EPS3_signal("ADS_3_SteerParkAgVld",0.0);
|
|
|
|
+ // SendEPS3();
|
|
|
|
+ // std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
|
|
+ // }
|
|
|
|
|
|
for(i=0;i<3000;i++)
|
|
for(i=0;i<3000;i++)
|
|
{
|
|
{
|
|
- set_EPS3_signal("ADS_3_SteerParkAgEna",2.0);
|
|
|
|
- set_EPS3_signal("ADS_3_SteerParkAgReq",fwheelang);
|
|
|
|
- set_EPS3_signal("ADS_3_SteerParkAgVld",1.0);
|
|
|
|
- gpsterraes->GetEPS3Data(ADS_EPS_3);
|
|
|
|
- ExecSend();
|
|
|
|
- rollcouter++;
|
|
|
|
- if(rollcouter>14)rollcouter = 0;
|
|
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerPilotAgEna",0.0);
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerAgReq",fwheelang);
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerAgVld",1.0);
|
|
|
|
+ SendEPS1();
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
}
|
|
}
|
|
|
|
|
|
for(i=0;i<10;i++)
|
|
for(i=0;i<10;i++)
|
|
{
|
|
{
|
|
- set_EPS3_signal("ADS_3_SteerParkAgEna",0.0);
|
|
|
|
- gpsterraes->GetEPS3Data(ADS_EPS_3);
|
|
|
|
- ExecSend();
|
|
|
|
- rollcouter++;
|
|
|
|
- if(rollcouter>14)rollcouter = 0;
|
|
|
|
|
|
+ set_EPS1_signal("ADS_1_SteerPilotAgEna",0.0);
|
|
|
|
+ SendEPS1();
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -535,6 +543,9 @@ int main(int argc, char *argv[])
|
|
EnableTorqueBrakeTest();
|
|
EnableTorqueBrakeTest();
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ testes();
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
std::thread xthread(sendthread);
|
|
std::thread xthread(sendthread);
|
|
|
|
|
|
gpsendthread = &xthread;
|
|
gpsendthread = &xthread;
|