use constants in params.py
This commit is contained in:
+2
-3
@@ -4,6 +4,7 @@ import time
|
||||
import serial
|
||||
from serial import Serial
|
||||
|
||||
from definitions import BAUDRATE
|
||||
from error.SIMError import SIMError
|
||||
from logs.LogSender import LOG_APPOINTMENT_SUCCESS, SUBJECT_SIM_INFO
|
||||
from params import firebase_store_manager, oracle_log_sender
|
||||
@@ -12,7 +13,6 @@ from utils.excel_reader import ExcelHelper
|
||||
|
||||
|
||||
class ModemPool:
|
||||
BAUDRATE = 115200
|
||||
phone_number_position = 10
|
||||
TAG = "ModemPool"
|
||||
|
||||
@@ -24,7 +24,7 @@ class ModemPool:
|
||||
self._db_manager = firebase_store_manager
|
||||
|
||||
for port in self._port_list:
|
||||
ser = serial.Serial(port, self.BAUDRATE, timeout=1)
|
||||
ser = serial.Serial(port, BAUDRATE, timeout=1)
|
||||
self._serial_list.append(ser)
|
||||
|
||||
def reset_all_modems(self):
|
||||
@@ -101,7 +101,6 @@ class ModemPool:
|
||||
msg = ser.read(100)
|
||||
except Exception as exc:
|
||||
print(exc)
|
||||
# msg = ser.read(100)
|
||||
print(msg)
|
||||
return msg
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ def start_book():
|
||||
modem.phone_number = contact[0].phone
|
||||
modem.contact = contact[0]
|
||||
if modem.contact:
|
||||
|
||||
commandor.start_page(modem.contact)
|
||||
start_to_handle_sms(modem)
|
||||
except Exception as error:
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user