Python Work


import MOD
import MDM
import SER
from SMS import *
from GPIOFunc import *
from Phone import *
from Config import *

def MainLoop():
 SER.send(‘Starting program…n’)
 while 1:
  keypressed = QueryPhoneButtonPressed()

  # Make Call
  if(keypressed == KEY_CALL_1):
  elif(keypressed == KEY_CALL_2):
  elif(keypressed == KEY_CALL_3):
  elif(keypressed == KEY_CALL_ALARM): # Maybe we need to treat this specially. BUT later 😉

  # How to determine that  ‘ A CALL COMES! ‘ ???????????
  # Code to detect coming call goes here….
  # TE Can notify the user there is a call in HARDWARE Way. So, not my concern!
  SER.send(‘Test if there is a coming calln’)
  if(QueryPhoneCall() == CALL_ON):
   SER.send(‘Got a call!n’)
   # Answer Call
   if(keypressed == KEY_CALL_ANSWER):
    SER.send(‘Answer call Key pressed’)
   elif(keypressed == KEY_CALL_END):
    SER.send(‘User Refused answering the calln’)

  SER.send(‘Trying to Config Devicen’)





电子邮件地址不会被公开。 必填项已用*标注