@@ -219,24 +219,26 @@ function showOutcome(res, initial) {
219219
220220// Displays help on the Touch10 or send the configuration to Cisco Spark
221221function showHelp ( ) {
222- console . log ( "showing map in Alert Panel" )
223-
224- // Width depends on device
225- // [TODO] check device
226- xapi . status . get ( "SystemUnit ProductPlatform" ) . then ( ( product ) => {
227- let width = 31 // when the Alert is shown on the device output screen
228- if ( product == "Touch10" ) {
229- console . debug ( 'running on a Touch10' )
230- width = 51 // when the Alter is shown on a Touch10
231- }
222+ console . log ( "showing map in Alert Panel" )
223+
224+ // Width depends on device
225+ // [TODO] check device
226+ xapi . status . get ( "SystemUnit ProductPlatform" ) . then ( ( product ) => {
227+ console . debug ( `running on a ${ product } ` )
228+
229+ let width = 51 // when the Alert is shown on a Touch 10
230+ if ( product == "DX80" ) {
231+ console . debug ( 'has no Touch10 attached' )
232+ width = 31 // when the Alert is shown on a screen
233+ }
232234
233- // show Alter panel
234- xapi . command ( 'UserInterface Message Alert Display' , {
235- Title : 'With a little help from ... the bot' ,
236- Text : game . buildMapAsWrapped ( width , true ) ,
237- Duration : 5
238- } )
235+ // show Aletr panel
236+ xapi . command ( 'UserInterface Message Alert Display' , {
237+ Title : 'With a little help from ... the bot' ,
238+ Text : game . buildMapAsWrapped ( width , true ) ,
239+ Duration : 5
239240 } )
241+ } )
240242}
241243
242244
0 commit comments