Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Baitboat
Commits
885ce7db
Commit
885ce7db
authored
12 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: remove DigitalReadFast
With APHal all reads are fast
parent
21f3534a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ArduCopter/compat.pde
+0
-5
0 additions, 5 deletions
ArduCopter/compat.pde
ArduCopter/system.pde
+2
-2
2 additions, 2 deletions
ArduCopter/system.pde
with
2 additions
and
7 deletions
ArduCopter/compat.pde
+
0
−
5
View file @
885ce7db
...
@@ -30,11 +30,6 @@ void digitalWrite(uint8_t pin, uint8_t out)
...
@@ -30,11 +30,6 @@ void digitalWrite(uint8_t pin, uint8_t out)
hal
.
gpio
->
write
(
pin
,
out
);
hal
.
gpio
->
write
(
pin
,
out
);
}
}
uint8_t
digitalReadFast
(
uint8_t
pin
)
{
return
hal
.
gpio
->
read
(
pin
);
}
uint8_t
digitalRead
(
uint8_t
pin
)
uint8_t
digitalRead
(
uint8_t
pin
)
{
{
return
hal
.
gpio
->
read
(
pin
);
return
hal
.
gpio
->
read
(
pin
);
...
...
This diff is collapsed.
Click to expand it.
ArduCopter/system.pde
+
2
−
2
View file @
885ce7db
...
@@ -82,7 +82,7 @@ static void init_ardupilot()
...
@@ -82,7 +82,7 @@ static void init_ardupilot()
// USB_MUX_PIN
// USB_MUX_PIN
pinMode
(
USB_MUX_PIN
,
INPUT
);
pinMode
(
USB_MUX_PIN
,
INPUT
);
ap_system
.
usb_connected
=
!
digitalRead
Fast
(
USB_MUX_PIN
);
ap_system
.
usb_connected
=
!
digitalRead
(
USB_MUX_PIN
);
if
(
!
ap_system
.
usb_connected
)
{
if
(
!
ap_system
.
usb_connected
)
{
// USB is not connected, this means UART0 may be a Xbee, with
// USB is not connected, this means UART0 may be a Xbee, with
// its darned bricking problem. We can't write to it for at
// its darned bricking problem. We can't write to it for at
...
@@ -534,7 +534,7 @@ static uint32_t map_baudrate(int8_t rate, uint32_t default_baud)
...
@@ -534,7 +534,7 @@ static uint32_t map_baudrate(int8_t rate, uint32_t default_baud)
#if USB_MUX_PIN > 0
#if USB_MUX_PIN > 0
static
void
check_usb_mux
(
void
)
static
void
check_usb_mux
(
void
)
{
{
bool
usb_check
=
!
digitalRead
Fast
(
USB_MUX_PIN
);
bool
usb_check
=
!
digitalRead
(
USB_MUX_PIN
);
if
(
usb_check
==
ap_system
.
usb_connected
)
{
if
(
usb_check
==
ap_system
.
usb_connected
)
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment