示例#1
0
    ## If using TCPIP (PROTOCOL = 'TCPIP')
    ## Else leave blank (PROTOCOL = '')
    myApp.PROTOCOL = 'TCPIP'

    ## INTERVAL
    ## How many seconds the demo will wait before sending new GPS data to server.
    ## In this demo, GPS data will be sent every 60 seconds (INTERVAL = '60')
    myApp.INTERVAL = '60' 

    try:
        myApp.RUN_MODE = 0              #Running in IDE
        test = float(myApp.RUN_MODE)    #float not implemented in Telit module
    except:
        myApp.RUN_MODE = 1              #Running in GE865-DUAL Python Environment

    DEBUG_CF.init('115200','8N1')
    DEBUG_CF.CLS(myApp.RUN_MODE)
    DEBUG_CF.sendMsg("GSM865CF GPS DEMO\r\r\n",myApp.RUN_MODE)

    main()
    
    DEBUG_CF.sendMsg("Main Script Exit",myApp.RUN_MODE)
    DEBUG_CF.sendMsg("....Rebooting",myApp.RUN_MODE)
    #Reboot or Script will not restart until a power cycle occurs
    ATC.reboot()

except:

    DEBUG_CF.sendMsg("Main Script encountered an exception",myApp.RUN_MODE)
    DEBUG_CF.sendMsg("Exception Type: " + str(sys.exc_type),myApp.RUN_MODE)
    DEBUG_CF.sendMsg("MODULE -> GSM865CF_GPS",myApp.RUN_MODE)