Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
44892294
Commit
44892294
authored
Mar 31, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused functions led.inc
parent
42afd3a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
54 deletions
+0
-54
led.inc
src/etc/inc/led.inc
+0
-54
No files found.
src/etc/inc/led.inc
View file @
44892294
...
...
@@ -20,35 +20,6 @@ function led_ctl($led, $str) {
return
false
;
}
/*
* Blink an LED at set speed from 1-9 (1=Very Fast, 9=Very Slow)
*/
function
led_blink
(
$led
,
$speed
=
0
)
{
switch
(
$speed
)
{
case
"reallyfast"
:
case
"veryfast"
:
$speed
=
1
;
break
;
case
"fast"
:
$speed
=
3
;
break
;
case
"medium"
:
$speed
=
5
;
break
;
case
"slow"
:
$speed
=
7
;
break
;
case
"reallyslow"
:
case
"veryslow"
:
$speed
=
9
;
break
;
}
if
(
is_numeric
(
$speed
)
&&
(
$speed
>
0
)
&&
(
$speed
<
10
))
{
return
led_ctl
(
$led
,
"f
{
$speed
}
"
);
}
return
false
;
}
/*
* Blink an LED in a specific pattern
* Letters A-J are on from 1/10s to 1s
...
...
@@ -67,22 +38,6 @@ function led_morse($led, $message) {
return
led_ctl
(
$led
,
"m"
.
str_to_morse
(
$message
));
}
/*
* Blink digits out on LED at 1/10s intervals
* e.g 1=1 blink, 8=8 blinks
* 0 is 10 pulses.
* One second pause between digits.
*/
function
led_digit
(
$led
,
$digitstring
)
{
$i
=
0
;
$dstring
=
"d"
;
while
(
$i
<
strlen
(
$digitstring
))
{
$thisdigit
=
substr
(
$digitstring
,
$i
++
,
1
);
if
(
is_numeric
(
$thisdigit
))
$dstring
.=
$thisdigit
;
}
led_ctl
(
$led
,
$dstring
);
}
/*
* Turn an LED on
...
...
@@ -149,15 +104,6 @@ function led_normalize() {
led_off
(
3
);
}
/*
* Shut off ALL LEDs.
*/
function
led_alloff
()
{
led_off
(
1
);
led_off
(
2
);
led_off
(
3
);
}
/*
* Translate a string to morse code. Characters not known to have a
* valid morse code representation will be ignored.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment