Discoveroutdoors
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Discoveroutdoors
-
-
hi Pete and all how maybe able to help
i have found and modified Goflight pro MCP Lua script but I have hit wall with IAS/MACH Crossover. It is falling over in the IAS/MACH section stringSPD = string.format("%03d", SPD) saying unexpected symbol near '=='
is the a better why to write this section, if how can i fix it.
prevCRS1 = -1prevSPD = -1prevHDG = -1prevalt = -1prevVS = -1prevCRS2 = -1prevMACH = -1--************************All Working*************************************************while 1 doCRS1 = ipc.readSW("0C4E")if (CRS1 ~= prevCRS1) thenstringCRS1 = string.format("%03d", CRS1)gfd.setDisplay(GFMCPPRO,0,0,stringCRS1)prevCRS1 = CRS1endHDG = ipc.readSD("07CC")if (HDG ~= prevHDG) thenstringHDG = string.format("%03d", ((HDG/65536)*360))gfd.setDisplay(GFMCPPRO,0,2,stringHDG)prevHDG = HDGendalt = ipc.readSD("07D4")if (alt ~= prevalt) thenstringalt = string.format("%05d", ((alt/65536)*3.2809))gfd.setDisplay(GFMCPPRO,0,3,stringalt)prevalt = altendVS = ipc.readSW("07F2")if (VS ~= prevVS) thenstringalt = string.format("%05d", VS)gfd.setDisplay(GFMCPPRO,0,4,stringalt)prevVS = VSendCRS2 = ipc.readSW("0C5E")if (CRS2 ~= prevCRS2) thenstringCRS2 = string.format("%03d", CRS2)gfd.setDisplay(GFMCPPRO,0,5,stringCRS2)prevCRS2 = CRS2end--*******************************************************************************************************--*******************IAS/MACH Crossover NEED Help!!!!!!!!!!!!!****************************************if ipc.readUD("07DC" and "07E4") == 0 thenSPD = ipc.readSW("07E2")if (SPD ~= prevSPD) thenstringSPD = string.format("%03d", SPD)gfd.SetDisplay(GFMCPPRO,0,1,stringSPD)prevSPD = SPDendelse ipc.readUD("07DC") == 1 and ("07E42") == 0 thenSPD = ipc.readSW("07E2")if (SPD ~= prevSPD) thenstringSPD = string.format("%03d", SPD)gfd.SetDisplay(GFMCPPRO,0,1,stringSPD)prevSPD = SPDendelse ipc.readUD("07DC") == 0 and ("07E42") == 1 thenMACH = ipc.readSD("07E8")if (MACH ~= prevMACH) thenstringMACH = string.format ("%02f", MACH/65536)gfd.SetDisplay(GFMCPPRO,0,1,stringMACH)prevMACH = MACHend--**********************************************************************************************ipc.sleep(200)endThanksJohan
GFMcp lua issues
in FSUIPC Support Pete Dowson Modules
Posted
thanks pete of look at the code, i did not then see that in line 50, I know you do not do code checking but i just need a freash eye.
thanks again
johan