mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Fix C robot template not correctly looping (#5474)
- The event wouldn't reset, causing infinite looping - Refresh ds data was missing
This commit is contained in:
@@ -87,7 +87,7 @@ int main(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
WPI_EventHandle eventHandle = WPI_CreateEvent(1, 0);
|
||||
WPI_EventHandle eventHandle = WPI_CreateEvent(0, 0);
|
||||
HAL_ProvideNewDataEventHandle(eventHandle);
|
||||
|
||||
while (1) {
|
||||
@@ -99,6 +99,8 @@ int main(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
HAL_RefreshDSData();
|
||||
|
||||
enum DriverStationMode dsMode = getDSMode();
|
||||
switch (dsMode) {
|
||||
case DisabledMode:
|
||||
|
||||
Reference in New Issue
Block a user