mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
refactored HAL library
builds two libraries, Athena and Desktop. Simulation should use Desktop, Robots should use Athena Also: - copied Driverstation and Joystick from Devices into Sim - Descreased dependency of pthreads in JNI. - removed Simulation ifdef from non simulation - added missing decprecated attribute for msvc - removed usage reporting from sim - removed unused pom.xml and constexpr Change-Id: If8eb540f9434dce17c77a245fda6985713e80b2d
This commit is contained in:
@@ -124,33 +124,33 @@ void SampleRobot::StartCompetition()
|
||||
{
|
||||
if (IsDisabled())
|
||||
{
|
||||
m_ds->InDisabled(true);
|
||||
m_ds.InDisabled(true);
|
||||
Disabled();
|
||||
m_ds->InDisabled(false);
|
||||
while (IsDisabled()) sleep(1); //m_ds->WaitForData();
|
||||
m_ds.InDisabled(false);
|
||||
while (IsDisabled()) sleep(1); //m_ds.WaitForData();
|
||||
}
|
||||
else if (IsAutonomous())
|
||||
{
|
||||
m_ds->InAutonomous(true);
|
||||
m_ds.InAutonomous(true);
|
||||
Autonomous();
|
||||
m_ds->InAutonomous(false);
|
||||
while (IsAutonomous() && IsEnabled()) sleep(1); //m_ds->WaitForData();
|
||||
m_ds.InAutonomous(false);
|
||||
while (IsAutonomous() && IsEnabled()) sleep(1); //m_ds.WaitForData();
|
||||
}
|
||||
else if (IsTest())
|
||||
{
|
||||
lw.SetEnabled(true);
|
||||
m_ds->InTest(true);
|
||||
Test();
|
||||
m_ds->InTest(false);
|
||||
while (IsTest() && IsEnabled()) sleep(1); //m_ds->WaitForData();
|
||||
m_ds.InTest(true);
|
||||
Test();
|
||||
m_ds.InTest(false);
|
||||
while (IsTest() && IsEnabled()) sleep(1); //m_ds.WaitForData();
|
||||
lw.SetEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ds->InOperatorControl(true);
|
||||
m_ds.InOperatorControl(true);
|
||||
OperatorControl();
|
||||
m_ds->InOperatorControl(false);
|
||||
while (IsOperatorControl() && IsEnabled()) sleep(1); //m_ds->WaitForData();
|
||||
m_ds.InOperatorControl(false);
|
||||
while (IsOperatorControl() && IsEnabled()) sleep(1); //m_ds.WaitForData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user