Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #96 from ImpossibleReality/main
Browse files Browse the repository at this point in the history
Fix: AsyncRobot only runs opcontrol
  • Loading branch information
Gavin-Niederman authored Feb 28, 2024
2 parents 5fe9a56 + 5fd6360 commit 8ff512e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Before releasing:
### Fixed

- Fix error handling and error type variats in ADI bindings
- Fix `AsynRobot` only running opcontrol

### Changed

Expand Down
6 changes: 3 additions & 3 deletions packages/pros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ macro_rules! __gen_async_exports {
#[doc(hidden)]
#[no_mangle]
extern "C" fn autonomous() {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::opcontrol(unsafe {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::auto(unsafe {
ROBOT
.as_mut()
.expect("Expected initialize to run before auto")
Expand All @@ -220,7 +220,7 @@ macro_rules! __gen_async_exports {
#[doc(hidden)]
#[no_mangle]
extern "C" fn disabled() {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::opcontrol(unsafe {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::disabled(unsafe {
ROBOT
.as_mut()
.expect("Expected initialize to run before disabled")
Expand All @@ -231,7 +231,7 @@ macro_rules! __gen_async_exports {
#[doc(hidden)]
#[no_mangle]
extern "C" fn competition_initialize() {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::opcontrol(unsafe {
$crate::async_runtime::block_on(<$rbt as $crate::AsyncRobot>::comp_init(unsafe {
ROBOT
.as_mut()
.expect("Expected initialize to run before comp_init")
Expand Down

0 comments on commit 8ff512e

Please sign in to comment.