modified assembly tests: no more QR code steep, and logging tensions/data measured by axp209

This commit is contained in:
busebusemac 2020-09-21 23:09:28 +02:00
parent 9061052e2e
commit ea3cd5f1bc
2 changed files with 39 additions and 22 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
*/output/* */output/*
*~ *~
br.log br.log
id_rsa_funkey
id_rsa_funkey.pub

View File

@ -111,6 +111,13 @@ function launch_tests_up_until_magnet {
fi fi
sync sync
## Dump power info from AXP209
echo "AXP209 DUMP BATTERY:"
cat /sys/class/power_supply/axp20x-battery/uevent
echo "AXP209 DUMP USB:"
cat /sys/class/power_supply/axp20x-usb//uevent
sync
## Launch prod screen test display ## Launch prod screen test display
echo "TEST DISPLAY:" echo "TEST DISPLAY:"
sync sync
@ -275,26 +282,29 @@ function launch_tests_after_magnet {
fi fi
sync sync
## Show datamatrix ## Bypassing QRcode screen
test -f $QR_CODE_IMG && rm $QR_CODE_IMG perform_QRcode_test=false
echo "Writing QR code img to $QR_CODE_IMG" if $perform_QRcode_test; then
#echo -n $proc_uid | dmtxwrite > $QR_CODE_IMG ## Show datamatrix
qrencode -m 1 -o $QR_CODE_IMG "$proc_uid" test -f $QR_CODE_IMG && rm $QR_CODE_IMG
echo "QRCODE STEP:" echo "Writing QR code img to $QR_CODE_IMG"
sync #echo -n $proc_uid | dmtxwrite > $QR_CODE_IMG
$PROD_SCREEN_BIN SHOW_IMAGE $QR_CODE_IMG 2>&1 qrencode -m 1 -o $QR_CODE_IMG "$proc_uid"
res="$?" echo "QRCODE STEP:"
if [[ "$res" == "0" ]]; then sync
echo " $res" $PROD_SCREEN_BIN SHOW_IMAGE $QR_CODE_IMG 2>&1
echo " OK" res="$?"
stop_loop=true if [[ "$res" == "0" ]]; then
else echo " $res"
echo " $res" echo " OK"
echo " FAIL" else
test_failed=true echo " $res"
return echo " FAIL"
test_failed=true
return
fi
sync
fi fi
sync
} }
@ -322,10 +332,15 @@ while ! $stop_loop; do
test_failed=false test_failed=false
# Check if first start or instant action # Check if first start or instant action
if [[ -f $MAGNET_DETECTED_FILE ]]; then if [[ ! -f $MAGNET_DETECTED_FILE ]]; then
launch_tests_after_magnet 2>&1 >> $LOG_FILE
else
launch_tests_up_until_magnet 2>&1 >> $LOG_FILE launch_tests_up_until_magnet 2>&1 >> $LOG_FILE
else
launch_tests_after_magnet 2>&1 >> $LOG_FILE
## Exit loop condition
if ! $test_failed; then
stop_loop=true
fi
fi fi
# Show fail screen if some tests failed # Show fail screen if some tests failed