Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MessdatenSilo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Kloock
MessdatenSilo
Commits
8716c8b4
Commit
8716c8b4
authored
Jun 25, 2022
by
Lennard
Browse files
Options
Downloads
Patches
Plain Diff
Update overriding of commits and add detection for size of bash.log
parent
fc902810
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#783
passed
Jun 26, 2022
Stage: convert
Stage: upload
Stage: delete
Stage: release
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/run.bash
+13
-2
13 additions, 2 deletions
scripts/run.bash
scripts/serial_id.py
+1
-1
1 addition, 1 deletion
scripts/serial_id.py
with
14 additions
and
3 deletions
scripts/run.bash
+
13
−
2
View file @
8716c8b4
...
@@ -23,15 +23,26 @@ if [ $? -eq 0 ]; then
...
@@ -23,15 +23,26 @@ if [ $? -eq 0 ]; then
fi
fi
echo
-e
"
\n
Python script ended"
echo
-e
"
\n
Python script ended"
# Check if bash.log is becoming too large
linecount
=
$(
wc
-l
< bash.log
)
if
[[
$linecount
-ge
3000
]]
;
then
# delete the first linecount - 3000 lines
delete_lines
=
$((
$linecount
-
3000
))
sed
-i
"1,
${
delete_lines
}
d"
bash.log
fi
git pull
git pull
last_commit_name
=
$(
git log
-1
--pretty
=
%B |
cat
)
last_commit_name
=
$(
git log
-1
--pretty
=
%B |
cat
)
if
[[
$string
==
*
"New data"
*
]]
;
then
if
[[
$last_commit_name
==
"New data"
]]
then
# check if the last commit was "New data"
# check if the last commit was "New data"
# if yes overwrite the commit
# if yes overwrite the commit
git reset
--soft
HEAD~1
git reset
--soft
HEAD~1
fi
fi
sudo
shutdown +5761
git add
.
git add
.
git commit
-m
"New data"
&&
git push
--force
git commit
-m
"New data"
&&
git push
--force
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/serial_id.py
+
1
−
1
View file @
8716c8b4
"""
Return the id of the arduino connected to the first serial port.
i
d
0
is for
Temperaturm
essung, id
1
for
DMSM
essung
"""
Return the id of the arduino connected to the first serial port.
I
d
1
is for
DMSM
essung, id
2
for
Temperaturm
essung
.
"""
"""
import
time
import
time
import
serial
import
serial
...
...
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