mirror of
https://gitee.com/qpy-solutions/tracker-v2.git
synced 2025-05-19 11:08:26 +08:00
update: 1. modules; 2. tracker sim; 3. tracker temp_humidity_sensor init.
This commit is contained in:
parent
91062c517a
commit
dd4e968d9d
@ -1 +1 @@
|
|||||||
Subproject commit 94e8ba30909c6b4056ddaa547b87a879f7053091
|
Subproject commit c899ebc7d4dc1a05dc7040e40895b21e89bb2706
|
@ -12,11 +12,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import sim
|
|
||||||
import net
|
import net
|
||||||
import modem
|
import modem
|
||||||
import utime
|
import utime
|
||||||
import dataCall
|
import dataCall
|
||||||
|
from machine import I2C
|
||||||
|
|
||||||
from usr.modules.sensor import Sensor
|
from usr.modules.sensor import Sensor
|
||||||
from usr.modules.battery import Battery
|
from usr.modules.battery import Battery
|
||||||
@ -42,12 +42,14 @@ try:
|
|||||||
from misc import PowerKey
|
from misc import PowerKey
|
||||||
except ImportError:
|
except ImportError:
|
||||||
PowerKey = None
|
PowerKey = None
|
||||||
|
try:
|
||||||
|
import sim
|
||||||
|
sim.setSimDet(1, 0)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
log = getLogger(__name__)
|
log = getLogger(__name__)
|
||||||
|
|
||||||
sim.setSimDet(1, 0)
|
|
||||||
|
|
||||||
|
|
||||||
def pwk_callback(status):
|
def pwk_callback(status):
|
||||||
if status == 0:
|
if status == 0:
|
||||||
@ -124,7 +126,7 @@ def tracker():
|
|||||||
battery = Battery()
|
battery = Battery()
|
||||||
data_call = dataCall
|
data_call = dataCall
|
||||||
low_energy = LowEnergyManage()
|
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
|
usb = USB() if USB is not None else None
|
||||||
power_key = PowerKey() if PowerKey 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")
|
_loc_method = current_settings.get("user_cfg", {}).get("loc_method")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user