Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL RS485 - Testing
Commits
a10a8e63
Commit
a10a8e63
authored
Dec 04, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw-rtm: Changes to rename script
Same as two commits back for the FM PTS.
parent
e8702ab3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
ptsdefine.py
pts-rtm/python/ptsdefine.py
+0
-1
rename
pts-rtm/rename
+10
-10
No files found.
pts-rtm/python/ptsdefine.py
View file @
a10a8e63
...
...
@@ -106,4 +106,3 @@ SFP_DPRAM_OFS = 0x600
# Pulse counter base address
PULSE_CNT_BASE
=
0xc00
pts-rtm/rename
View file @
a10a8e63
...
...
@@ -4,35 +4,35 @@ import sys
from
subprocess
import
*
from
string
import
Template
sys
.
argv
[
1
]
=
sys
.
argv
[
1
]
.
lower
()
try
:
with
open
(
"ubuntu/
%
s/pyts/ptsdefine.py"
%
(
sys
.
argv
[
1
]),
"r+"
)
as
f
:
sys
.
argv
[
1
]
=
sys
.
argv
[
1
]
.
lower
()
with
open
(
"ubuntu/
%
s/pyts/ptsdefine.py"
%
(
sys
.
argv
[
1
]),
"r"
)
as
f
:
buf
=
f
.
read
()
buf
=
Template
(
buf
)
buf
=
buf
.
substitute
(
BOARD
=
sys
.
argv
[
1
],
ELMAIP
=
sys
.
argv
[
2
],
ELMAPWD
=
sys
.
argv
[
3
],
ELMASLOT
=
sys
.
argv
[
4
])
f
.
seek
(
0
)
with
open
(
"ubuntu/
%
s/pyts/ptsdefine.py"
%
(
sys
.
argv
[
1
]),
"w"
)
as
f
:
f
.
write
(
buf
)
with
open
(
"ubuntu/
%
s/shell/get-fan-speeds"
%
(
sys
.
argv
[
1
]),
"r
+
"
)
as
f
:
with
open
(
"ubuntu/
%
s/shell/get-fan-speeds"
%
(
sys
.
argv
[
1
]),
"r"
)
as
f
:
buf
=
f
.
read
()
buf
=
Template
(
buf
)
buf
=
buf
.
substitute
(
ELMAIP
=
sys
.
argv
[
2
],
ELMAPWD
=
sys
.
argv
[
3
])
f
.
seek
(
0
)
with
open
(
"ubuntu/
%
s/shell/get-fan-speeds"
%
(
sys
.
argv
[
1
]),
"w"
)
as
f
:
f
.
write
(
buf
)
with
open
(
"ubuntu/
%
s/shell/men-on"
%
(
sys
.
argv
[
1
]),
"r
+
"
)
as
f
:
with
open
(
"ubuntu/
%
s/shell/men-on"
%
(
sys
.
argv
[
1
]),
"r"
)
as
f
:
buf
=
f
.
read
()
buf
=
Template
(
buf
)
buf
=
buf
.
substitute
(
ELMAIP
=
sys
.
argv
[
2
],
ELMAPWD
=
sys
.
argv
[
3
])
f
.
seek
(
0
)
with
open
(
"ubuntu/
%
s/shell/men-on"
%
(
sys
.
argv
[
1
]),
"w"
)
as
f
:
f
.
write
(
buf
)
with
open
(
"ubuntu/
%
s/shell/men-off"
%
(
sys
.
argv
[
1
]),
"r
+
"
)
as
f
:
with
open
(
"ubuntu/
%
s/shell/men-off"
%
(
sys
.
argv
[
1
]),
"r"
)
as
f
:
buf
=
f
.
read
()
buf
=
Template
(
buf
)
buf
=
buf
.
substitute
(
ELMAIP
=
sys
.
argv
[
2
],
ELMAPWD
=
sys
.
argv
[
3
])
f
.
seek
(
0
)
with
open
(
"ubuntu/
%
s/shell/men-off"
%
(
sys
.
argv
[
1
]),
"w"
)
as
f
:
f
.
write
(
buf
)
except
IndexError
:
...
...
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