diff --git a/HDFwear/20240126ReadMe.md b/HDFwear/20240126ReadMe.md index 957f0e3..2c08bba 100644 --- a/HDFwear/20240126ReadMe.md +++ b/HDFwear/20240126ReadMe.md @@ -75,4 +75,21 @@ BluetoothManager+Function 接收: [237, 126, 0, 1, 128, 9, 0, 1, 0, 64, 101, 155, 227, 192, 0, 0, 46, 224, 0, 0, 78, 32, 0, 0, 23, 112, 101, 155, 241, 208, 0, 0, 46, 224, 0, 0, 82, 8, 0, 0, 23, 112, 101, 155, 255, 224, 0, 0, 46, 224, 0, 0, 85, 240, 0, 0, 23, 112, 101, 156, 13, 240, 0, 0, 46, 224, 0, 0, 89, 216, 0, 0, 23, 112, 166, 117] 接收: [237, 126, 0, 1, 128, 9, 0, 2, 0, 1, 255, 206, 145] +拉取GPS轨迹数据 + func newGetGpsData(option: SyncOption = .now, closure: GpsClosure? = nil) + 当前 + 发送: [237, 126, 0, 1, 0, 40, 0, 1, 0, 2, 10, 1, 201, 3] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 169, 1, 101, 133, 64, 133, 0, 0, 0, 20, 13, 84, 119, 118, 0, 1, 134, 160, 67, 167, 129, 234, 0, 1, 134, 160, 13, 84, 119, 218, 0, 1, 134, 160, 67, 167, 133, 210, 0, 1, 134, 160, 13, 84, 120, 62, 0, 1, 134, 160, 67, 167, 137, 186, 0, 1, 134, 160, 13, 84, 120, 162, 0, 1, 134, 160, 67, 167, 141, 162, 0, 1, 134, 160, 13, 84, 121, 6, 0, 1, 134, 160, 67, 167, 145, 138, 0, 1, 134, 160, 13, 84, 121, 106, 0, 1, 134, 160, 67, 167, 149, 114, 0, 1, 134, 160, 13, 84, 123, 94, 0, 1, 134, 160, 67, 167, 153, 90, 0, 1, 134, 160, 13, 84, 127, 70, 0, 1, 134, 160, 67, 167, 157, 66, 0, 1, 134, 160, 13, 84, 131, 46, 0, 1, 134, 160, 67, 167, 161, 42, 0, 1, 134, 160, 13, 84, 135, 22, 0, 1, 134, 160, 67, 167, 165, 18, 0, 1, 134, 160, 215, 137] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 169, 1, 101, 133, 64, 133, 0, 0, 0, 20, 13, 84, 138, 254, 0, 1, 134, 160, 67, 167, 168, 250, 0, 1, 134, 160, 13, 84, 142, 230, 0, 1, 134, 160, 67, 167, 172, 226, 0, 1, 134, 160, 13, 84, 146, 206, 0, 1, 134, 160, 67, 167, 176, 202, 0, 1, 134, 160, 13, 84, 142, 230, 0, 1, 134, 160, 67, 167, 172, 226, 0, 1, 134, 160, 13, 84, 138, 254, 0, 1, 134, 160, 67, 167, 168, 250, 0, 1, 134, 160, 13, 84, 135, 22, 0, 1, 134, 160, 67, 167, 161, 42, 0, 1, 134, 160, 13, 84, 131, 46, 0, 1, 134, 160, 67, 167, 157, 66, 0, 1, 134, 160, 13, 84, 123, 94, 0, 1, 134, 160, 67, 167, 153, 90, 0, 1, 134, 160, 13, 84, 119, 118, 0, 1, 134, 160, 67, 167, 149, 114, 0, 1, 134, 160, 13, 84, 115, 142, 0, 1, 134, 160, 67, 167, 141, 162, 0, 1, 134, 160, 68, 78] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 1, 255, 107, 166] + 历史 + 发送: [237, 126, 0, 1, 0, 40, 0, 1, 0, 2, 10, 2, 249, 96] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 169, 1, 101, 133, 64, 133, 0, 0, 0, 20, 13, 84, 119, 118, 0, 1, 134, 160, 67, 167, 129, 234, 0, 1, 134, 160, 13, 84, 119, 218, 0, 1, 134, 160, 67, 167, 133, 210, 0, 1, 134, 160, 13, 84, 120, 62, 0, 1, 134, 160, 67, 167, 137, 186, 0, 1, 134, 160, 13, 84, 120, 162, 0, 1, 134, 160, 67, 167, 141, 162, 0, 1, 134, 160, 13, 84, 121, 6, 0, 1, 134, 160, 67, 167, 145, 138, 0, 1, 134, 160, 13, 84, 121, 106, 0, 1, 134, 160, 67, 167, 149, 114, 0, 1, 134, 160, 13, 84, 123, 94, 0, 1, 134, 160, 67, 167, 153, 90, 0, 1, 134, 160, 13, 84, 127, 70, 0, 1, 134, 160, 67, 167, 157, 66, 0, 1, 134, 160, 13, 84, 131, 46, 0, 1, 134, 160, 67, 167, 161, 42, 0, 1, 134, 160, 13, 84, 135, 22, 0, 1, 134, 160, 67, 167, 165, 18, 0, 1, 134, 160, 215, 137] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 169, 1, 101, 133, 64, 133, 0, 0, 0, 20, 13, 84, 138, 254, 0, 1, 134, 160, 67, 167, 168, 250, 0, 1, 134, 160, 13, 84, 142, 230, 0, 1, 134, 160, 67, 167, 172, 226, 0, 1, 134, 160, 13, 84, 146, 206, 0, 1, 134, 160, 67, 167, 176, 202, 0, 1, 134, 160, 13, 84, 142, 230, 0, 1, 134, 160, 67, 167, 172, 226, 0, 1, 134, 160, 13, 84, 138, 254, 0, 1, 134, 160, 67, 167, 168, 250, 0, 1, 134, 160, 13, 84, 135, 22, 0, 1, 134, 160, 67, 167, 161, 42, 0, 1, 134, 160, 13, 84, 131, 46, 0, 1, 134, 160, 67, 167, 157, 66, 0, 1, 134, 160, 13, 84, 123, 94, 0, 1, 134, 160, 67, 167, 153, 90, 0, 1, 134, 160, 13, 84, 119, 118, 0, 1, 134, 160, 67, 167, 149, 114, 0, 1, 134, 160, 13, 84, 115, 142, 0, 1, 134, 160, 67, 167, 141, 162, 0, 1, 134, 160, 68, 78] + 接收: [237, 126, 0, 1, 128, 37, 0, 1, 0, 1, 255, 107, 166] + + + + + 接受数据类 diff --git a/HDFwear/Mine/MineViewController.swift b/HDFwear/Mine/MineViewController.swift index deb29a1..15508c7 100644 --- a/HDFwear/Mine/MineViewController.swift +++ b/HDFwear/Mine/MineViewController.swift @@ -569,8 +569,18 @@ extension MineViewController: UITableViewDataSource, UITableViewDelegate { } } - let archiveAction101 = UIAlertAction(title: "newGetGpsData", style: .default) {[weak self] action in - BluetoothManager.shared.newGetGpsData() {gpsModel, error in + let archiveAction101a = UIAlertAction(title: "newGetGpsData now", style: .default) {[weak self] action in + BluetoothManager.shared.newGetGpsData(option: .now) {gpsModel, error in + if error != nil { + print("newGetGpsData" + (error?.description ?? "")) + }else { + self?.showDetailAlert(msg: gpsModel?.description) + print("newGetGpsData success") + } + } + } + let archiveAction101b = UIAlertAction(title: "newGetGpsData history", style: .default) {[weak self] action in + BluetoothManager.shared.newGetGpsData(option: .history) {gpsModel, error in if error != nil { print("newGetGpsData" + (error?.description ?? "")) }else { @@ -593,7 +603,8 @@ extension MineViewController: UITableViewDataSource, UITableViewDelegate { alert.addAction(archiveAction17a) alert.addAction(archiveAction17b) alert.addAction(archiveAction22) - alert.addAction(archiveAction101) + alert.addAction(archiveAction101a) + alert.addAction(archiveAction101b) alert.addAction(UIAlertAction(title: "取消", style: .destructive, handler: nil)) present(alert, animated: true, completion: nil)