Skip to content

Commit

Permalink
Merge pull request #1234 from lamassu/release-10.0.6
Browse files Browse the repository at this point in the history
Release 10.0.6
  • Loading branch information
RafaelTaranto authored Nov 25, 2024
2 parents 2309a99 + 7204552 commit a151638
Show file tree
Hide file tree
Showing 34 changed files with 793 additions and 233 deletions.
26 changes: 14 additions & 12 deletions deploy/codebase/lamassu-machine-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ function updateSupervisor (cb) {
.split('\n')
.flatMap(line => {
const service = line.split(' ', 1)?.[0]
return (!service || service === 'lamassu-watchdog') ? [] : [service]
return service ? [service] : []
})
.join(' ')
.filter(service => service !== 'lamassu-watchdog')
/*
* NOTE: Keep old behavior in case we don't get the expected output:
* update and restart all services. result:finished won't work.
*/
return services.length > 0 ? services : 'all'
return services.length > 0 ? services : ['all']
}

try {
Expand All @@ -96,28 +96,30 @@ function updateSupervisor (cb) {
} catch (err) {
return err.status === 3 ?
extractServices(err.stdout) :
'all' /* NOTE: see note above */
['all'] /* NOTE: see note above */
}
}

const osuser = getOSUser()
const services = getServices()
const allServices = services.join(' ')
const servicesNoCalibrateScreen = services.filter(service => service !== 'calibrate-screen').join(' ')

const commands = [
async.apply(command, `cp ${supervisorPath}/* /etc/supervisor/conf.d/`),
async.apply(command, `sed -i 's|^user=.*\$|user=${osuser}|;' /etc/supervisor/conf.d/lamassu-browser.conf || true`)
async.apply(command, `sed -i 's|^user=.*\$|user=${osuser}|;' /etc/supervisor/conf.d/lamassu-browser.conf || true`),
async.apply(command, `rm -f /etc/supervisor/conf.d/calibrate-screen.conf`),
async.apply(command, `supervisorctl update ${allServices}`),
async.apply(command, `supervisorctl stop ${servicesNoCalibrateScreen}`),
]

commands.push(async.apply(command, `supervisorctl update ${services}`))
commands.push(async.apply(command, `supervisorctl stop ${services}`))

if (machineCode == 'aveiro') {
LOG("Updating GSR50")
if (machineCode === 'aveiro') {
commands.push(async.apply(command, `supervisorctl stop lamassu-gsr50-devstart lamassu-gsr50`))
commands.push(async.apply(command, `cp ${applicationParentFolder}/lamassu-machine/lib/gsr50/binaries/* /opt/FujitsuGSR50/`))
commands.push(async.apply(command, `chmod +x /opt/FujitsuGSR50/FujitsuGSR50`))
}

commands.push(async.apply(command, `supervisorctl restart ${services}`))
commands.push(async.apply(command, `supervisorctl restart ${servicesNoCalibrateScreen}`))

async.series(commands, err => {
if (err) throw err;
Expand All @@ -143,7 +145,7 @@ const updateSystemd = cb => {

function restartWatchdogService (cb) {
async.series([
async.apply(command, 'supervisorctl update lamassu-watchdog'),
async.apply(command, 'supervisorctl update'),
async.apply(command, 'supervisorctl restart lamassu-watchdog'),
], err => {
if (err) throw err;
Expand Down
40 changes: 32 additions & 8 deletions hardware/system/coincloud/jcm-ipro-rc/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o left # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'ILITEK ILITEK-TP' --type=float 'Coordinate Transformation Matrix' $leftRotateMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen left
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'ILITEK ILITEK-TP'

This file was deleted.

40 changes: 32 additions & 8 deletions hardware/system/coincloud/mei-bnr/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o left # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'ILITEK ILITEK-TP' --type=float 'Coordinate Transformation Matrix' $leftRotateMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen left
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'ILITEK ILITEK-TP'

This file was deleted.

40 changes: 32 additions & 8 deletions hardware/system/coincloud/mei-scr/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o left # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'ILITEK ILITEK-TP' --type=float 'Coordinate Transformation Matrix' $leftRotateMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen left
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'ILITEK ILITEK-TP'

This file was deleted.

40 changes: 32 additions & 8 deletions hardware/system/generalbytes/batm3/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o normal # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'Virtual core pointer' --type=float 'Coordinate Transformation Matrix' $identityMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen normal
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'Virtual core pointer'
40 changes: 32 additions & 8 deletions hardware/system/generalbytes/batm7in/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o normal # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'ILITEK ILITEK-TP' --type=float 'Coordinate Transformation Matrix' $identityMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen normal
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'ILITEK ILITEK-TP'
40 changes: 32 additions & 8 deletions hardware/system/genmega/gemini/calibrate-screen.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
#!/usr/bin/env sh
xrandr -o left # normal, inverted, left, right
identityMat='1 0 0 0 1 0 0 0 1'
leftRotateMat='0 -1 1 1 0 0 0 0 1'
rightRotateMat='0 1 0 -1 0 1 0 0 1'
xinput set-prop 'ILITEK ILITEK-TP' --type=float 'Coordinate Transformation Matrix' $leftRotateMat
xset s off
xset s noblank
xset -dpms
set -e

### CHANGE CONFIGURATION AT THE END OF THE FILE ###

configure_screen() {
local rotation="$1"
case "${rotation}" in
normal) touchRotation='1 0 0 0 1 0 0 0 1';;
left) touchRotation='0 -1 1 1 0 0 0 0 1';;
right) touchRotation='0 1 0 -1 0 1 0 0 1';;
*) echo "Unknown rotation '${rotation}'..."; exit 1;;
esac
screenRotation="${rotation}"

xrandr -o "${screenRotation}" \
&& xset s off \
&& xset s noblank \
&& xset -dpms
}

configure_touch() {
local screen="$1"
xinput set-prop "${screen}" --type=float 'Coordinate Transformation Matrix' $touchRotation
}

### CHANGE CONFIGURATION BELOW TO MATCH THE CONNECTED SCREEN ###

# One of: normal, left, right
configure_screen left
# Find the screen name under "Virtual core pointer" of the following command:
# xinput list
configure_touch 'ILITEK ILITEK-TP'

This file was deleted.

Loading

0 comments on commit a151638

Please sign in to comment.