safety, these may need using environment variable CURRENT_UNIT
This commit is contained in:
parent
ffd936a99e
commit
9d43ce67ff
2 changed files with 36 additions and 0 deletions
19
examples/run_calibration.sh
Executable file
19
examples/run_calibration.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# for capturing magnet readings during calibration and then
|
||||
# buildling 3D model
|
||||
#
|
||||
CURRENT_UNIT=${CURRENT_UNIT}
|
||||
LOG=~/work/tbeam/${CURRENT_UNIT}_calibration_$(date +%Y%m%d_%H%M%S).log
|
||||
echo "Logging to: $LOG"
|
||||
|
||||
pio run -e T_BEAM_S3_SUPREME_SX1262 -t upload --upload-port /dev/ttyt${CURRENT_UNIT} && \
|
||||
pio device monitor -b 115200 -p /dev/ttyt${CURRENT_UNIT} | \
|
||||
perl -MTime::HiRes=time -ne '
|
||||
BEGIN { $t0 = time() }
|
||||
$elapsed = time() - $t0;
|
||||
$mm = int($elapsed / 60);
|
||||
$ss = int($elapsed % 60);
|
||||
$ms = int(($elapsed - int($elapsed)) * 1000);
|
||||
printf "%6d %02d:%02d.%03d %s", $. , $mm, $ss, $ms, $_;
|
||||
' | tee "$LOG"
|
||||
17
examples/run_test_after_calibration.sh
Executable file
17
examples/run_test_after_calibration.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# for capturing magnet readings during calibration and then
|
||||
# buildling 3D model
|
||||
#
|
||||
LOG=~/work/tbeam/ED_TEST_after_calibration_$(date +%Y%m%d_%H%M%S).log
|
||||
echo "Logging to: $LOG"
|
||||
|
||||
pio device monitor -b 115200 -p /dev/ttytED | \
|
||||
perl -MTime::HiRes=time -ne '
|
||||
BEGIN { $t0 = time() }
|
||||
$elapsed = time() - $t0;
|
||||
$mm = int($elapsed / 60);
|
||||
$ss = int($elapsed % 60);
|
||||
$ms = int(($elapsed - int($elapsed)) * 1000);
|
||||
printf "%6d %02d:%02d.%03d %s", $. , $mm, $ss, $ms, $_;
|
||||
' | tee "$LOG"
|
||||
Loading…
Add table
Add a link
Reference in a new issue