@@ -296,91 +296,6 @@ define_function NAVLogicEngineEventCallback(_NAVLogicEngineEvent args) {
296296#END_IF
297297
298298
299- // define_function Drive() {
300- // iLoop++
301-
302- // switch (iLoop) {
303- // case 1:
304- // case 6:
305- // case 11:
306- // case 16: {
307- // if (iCommMode == COMM_MODE_TWO_WAY) {
308- // SendQuery(pollSequence)
309- // return
310- // }
311- // }
312- // case 21: { iLoop = 0; return }
313- // default: {
314- // switch (iCommMode) {
315- // case COMM_MODE_ONE_WAY:
316- // case COMM_MODE_TWO_WAY: {
317- // if (iCommandLockOut) { return }
318- // if (uDisplay.PowerState.Required && (uDisplay.PowerState.Required == uDisplay.PowerState.Actual)) { uDisplay.PowerState.Required = 0; return }
319- // if (uDisplay.Input.Required && (uDisplay.Input.Required == uDisplay.Input.Actual)) { uDisplay.Input.Required = 0; return }
320- // if (uDisplay.Volume.Level.Required >= 0 && (uDisplay.Volume.Level.Required == uDisplay.Volume.Level.Actual)) { uDisplay.Volume.Level.Required = -1; return }
321-
322- // if (uDisplay.PowerState.Required && (uDisplay.PowerState.Required != uDisplay.PowerState.Actual) && module.Device.IsCommunicating) {
323- // SetPower(uDisplay.PowerState.Required)
324- // iCommandLockOut = true
325- // switch (iCommMode) {
326- // case COMM_MODE_ONE_WAY: { //One-Way
327- // switch (uDisplay.PowerState.Required) {
328- // case POWER_ON: {
329- // wait 80 {
330- // iCommandLockOut = false
331- // }
332- // }
333- // case REQUIRED_POWER_OFF: {
334- // wait 20 {
335- // iCommandLockOut = false
336- // }
337- // }
338- // }
339-
340- // uDisplay.PowerState.Actual = uDisplay.PowerState.Required //Emulate
341- // }
342- // case COMM_MODE_TWO_WAY: {
343- // wait 20 iCommandLockOut = false
344- // }
345- // }
346-
347- // pollSequence = GET_POWER
348- // return
349- // }
350-
351- // if (uDisplay.Input.Required && (uDisplay.Input.Required != uDisplay.Input.Actual) && (uDisplay.PowerState.Actual == ACTUAL_POWER_ON) && module.Device.IsCommunicating) {
352- // SetInput(uDisplay.Input.Required)
353- // if (iCommMode == COMM_MODE_ONE_WAY) { //One-Way
354- // uDisplay.Input.Actual = uDisplay.Input.Required //Emulate
355- // }
356-
357- // iCommandLockOut = true
358- // wait 20 iCommandLockOut = false
359- // pollSequence = GET_INPUT
360- // return
361- // }
362-
363- // if ([vdvObject,VOL_UP] && uDisplay.PowerState.Actual == ACTUAL_POWER_ON) { uDisplay.Volume.Level.Required++ }
364- // if ([vdvObject,VOL_DN] && uDisplay.PowerState.Actual == ACTUAL_POWER_ON) { uDisplay.Volume.Level.Required-- }
365-
366- // if (uDisplay.Volume.Level.Required && (uDisplay.Volume.Level.Required != uDisplay.Volume.Level.Actual) && (uDisplay.PowerState.Actual == ACTUAL_POWER_ON) && module.Device.IsCommunicating) {
367- // SetVolume(uDisplay.Volume.Level.Required)
368- // iCommandLockOut = true
369- // wait 5 iCommandLockOut = false
370- // pollSequence = GET_VOLUME
371- // return
372- // }
373- // }
374- // case COMM_MODE_ONE_WAY_BASIC: {
375- // if (uDisplay.PowerState.Required) { SetPower(uDisplay.PowerState.Required); uDisplay.PowerState.Required = 0; NAVErrorLog(NAV_LOG_LEVEL_DEBUG, 'LG_SENDING_POWER_COMMAND_TO_COMM') }
376- // if (uDisplay.Input.Required) { SetInput(uDisplay.Input.Required); uDisplay.Input.Required = 0; NAVErrorLog(NAV_LOG_LEVEL_DEBUG, 'LG_SENDING_INPUT_COMMAND_TO_COMM') }
377- // }
378- // }
379- // }
380- // }
381- // }
382-
383-
384299#IF_DEFINED USING_NAV_STRING_GATHER_CALLBACK
385300define_function NAVStringGatherCallback (_NAVStringGatherResult args ) {
386301 stack_var char data [NAV_MAX_BUFFER ]
@@ -425,7 +340,7 @@ define_function NAVStringGatherCallback(_NAVStringGatherResult args) {
425340 UpdateFeedback ()
426341 }
427342 case ' b' : {
428- object .Input.Actual = NAVFindInArrayString (INPUT_SNAPI_PARAMS , data )
343+ object .Input.Actual = NAVFindInArrayString (INPUT_COMMANDS , data )
429344
430345 UpdateFeedback ()
431346 pollSequence = GET_POWER
@@ -663,147 +578,6 @@ data_event[vdvObject] {
663578}
664579
665580
666- // data_event[vdvObject] {
667- // command: {
668- // stack_var char cCmdHeader[NAV_MAX_CHARS]
669- // stack_var char cCmdParam[3][NAV_MAX_CHARS]
670-
671- // NAVErrorLog(NAV_LOG_LEVEL_DEBUG, "'Command from ',NAVStringSurroundWith(NAVDeviceToString(data.device), '[', ']'),': [',data.text,']'")
672-
673- // cCmdHeader = DuetParseCmdHeader(data.text)
674- // cCmdParam[1] = DuetParseCmdParam(data.text)
675- // cCmdParam[2] = DuetParseCmdParam(data.text)
676- // cCmdParam[3] = DuetParseCmdParam(data.text)
677-
678- // switch (cCmdHeader) {
679- // case 'PROPERTY': {
680- // switch (cCmdParam[1]) {
681-
682- // }
683- // }
684- // case 'ADJUST': {}
685- // case 'POWER': {
686- // switch (cCmdParam[1]) {
687- // case 'ON': {
688- // uDisplay.PowerState.Required = POWER_ON
689- // Drive()
690- // }
691- // case 'OFF': {
692- // uDisplay.PowerState.Required = REQUIRED_POWER_OFF
693- // uDisplay.Input.Required = 0
694- // Drive()
695- // }
696- // }
697- // }
698- // case 'INPUT': {
699- // switch (cCmdParam[1]) {
700- // case 'VGA': {
701- // switch (cCmdParam[2]) {
702- // case '1': {
703- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
704- // uDisplay.PowerState.Required = POWER_ON
705- // }
706-
707- // uDisplay.Input.Required = REQUIRED_INPUT_VGA_1
708- // Drive()
709- // }
710- // }
711- // }
712- // case 'DVI': {
713- // switch (cCmdParam[2]) {
714- // case '1': {
715- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
716- // uDisplay.PowerState.Required = POWER_ON
717- // }
718-
719- // uDisplay.Input.Required = REQUIRED_INPUT_DVI_1
720- // Drive()
721- // }
722- // }
723- // }
724- // case 'COMPOSITE': {
725- // switch (cCmdParam[2]) {
726- // case '1': {
727- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
728- // uDisplay.PowerState.Required = POWER_ON
729- // }
730-
731- // uDisplay.Input.Required = REQUIRED_INPUT_VIDEO_1
732- // Drive()
733- // }
734- // }
735- // }
736- // case 'S-VIDEO': {
737- // switch (cCmdParam[2]) {
738- // case '1': {
739- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
740- // uDisplay.PowerState.Required = POWER_ON
741- // }
742-
743- // uDisplay.Input.Required = REQUIRED_INPUT_SVIDEO_1
744- // Drive()
745- // }
746- // }
747- // }
748- // case 'COMPONENT': {
749- // switch (cCmdParam[2]) {
750- // case '1': {
751- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
752- // uDisplay.PowerState.Required = POWER_ON
753- // }
754-
755- // uDisplay.Input.Required = REQUIRED_INPUT_RGB_1
756- // Drive()
757- // }
758- // }
759- // }
760- // case 'DISPLAYPORT': {
761- // switch (cCmdParam[2]) {
762- // case '1': {
763- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
764- // uDisplay.PowerState.Required = POWER_ON
765- // }
766-
767- // uDisplay.Input.Required = REQUIRED_INPUT_DISPLAYPORT_1
768- // Drive()
769- // }
770- // case '2': {
771- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
772- // uDisplay.PowerState.Required = POWER_ON
773- // }
774-
775- // uDisplay.Input.Required = REQUIRED_INPUT_DISPLAYPORT_2
776- // Drive()
777- // }
778- // }
779- // }
780- // case 'HDMI': {
781- // switch (cCmdParam[2]) {
782- // case '1': {
783- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
784- // uDisplay.PowerState.Required = POWER_ON
785- // }
786-
787- // uDisplay.Input.Required = REQUIRED_INPUT_HDMI_1
788- // Drive()
789- // }
790- // case '2': {
791- // if (iCommMode != COMM_MODE_ONE_WAY_BASIC) {
792- // uDisplay.PowerState.Required = POWER_ON
793- // }
794-
795- // uDisplay.Input.Required = REQUIRED_INPUT_HDMI_2
796- // Drive()
797- // }
798- // }
799- // }
800- // }
801- // }
802- // }
803- // }
804- // }
805-
806-
807581channel_event [vdvObject , 0 ] {
808582 on : {
809583 switch (channel .channel ) {
0 commit comments