update: 1. modules; 2. tracker sim; 3. tracker temp_humidity_sensor init.

This commit is contained in:
JackSun 2022-10-10 09:50:11 +08:00
parent 91062c517a
commit dd4e968d9d
2 changed files with 8 additions and 6 deletions

@ -1 +1 @@
Subproject commit 94e8ba30909c6b4056ddaa547b87a879f7053091
Subproject commit c899ebc7d4dc1a05dc7040e40895b21e89bb2706

View File

@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import sim
import net
import modem
import utime
import dataCall
from machine import I2C
from usr.modules.sensor import Sensor
from usr.modules.battery import Battery
@ -42,12 +42,14 @@ try:
from misc import PowerKey
except ImportError:
PowerKey = None
try:
import sim
sim.setSimDet(1, 0)
except:
pass
log = getLogger(__name__)
sim.setSimDet(1, 0)
def pwk_callback(status):
if status == 0:
@ -124,7 +126,7 @@ def tracker():
battery = Battery()
data_call = dataCall
low_energy = LowEnergyManage()
temp_humidity_sensor = TempHumiditySensor()
temp_humidity_sensor = TempHumiditySensor(I2C.I2C1, I2C.STANDARD_MODE)
usb = USB() if USB is not None else None
power_key = PowerKey() if PowerKey is not None else None
_loc_method = current_settings.get("user_cfg", {}).get("loc_method")