collect extra map report data
This commit is contained in:
@ -0,0 +1,7 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `nodes` ADD COLUMN `firmware_version` VARCHAR(191) NULL,
|
||||||
|
ADD COLUMN `has_default_channel` BOOLEAN NULL,
|
||||||
|
ADD COLUMN `modem_preset` INTEGER NULL,
|
||||||
|
ADD COLUMN `num_online_local_nodes` INTEGER NULL,
|
||||||
|
ADD COLUMN `position_precision` INTEGER NULL,
|
||||||
|
ADD COLUMN `region` INTEGER NULL;
|
@ -22,6 +22,13 @@ model Node {
|
|||||||
role Int
|
role Int
|
||||||
is_licensed Boolean?
|
is_licensed Boolean?
|
||||||
|
|
||||||
|
firmware_version String?
|
||||||
|
region Int?
|
||||||
|
modem_preset Int?
|
||||||
|
has_default_channel Boolean?
|
||||||
|
position_precision Int?
|
||||||
|
num_online_local_nodes Int?
|
||||||
|
|
||||||
latitude Int?
|
latitude Int?
|
||||||
longitude Int?
|
longitude Int?
|
||||||
altitude Int?
|
altitude Int?
|
||||||
|
@ -630,6 +630,12 @@ client.on("message", async (topic, message) => {
|
|||||||
latitude: mapReport.latitudeI,
|
latitude: mapReport.latitudeI,
|
||||||
longitude: mapReport.longitudeI,
|
longitude: mapReport.longitudeI,
|
||||||
altitude: mapReport.altitude !== 0 ? mapReport.altitude : null,
|
altitude: mapReport.altitude !== 0 ? mapReport.altitude : null,
|
||||||
|
firmware_version: mapReport.firmwareVersion,
|
||||||
|
region: mapReport.region,
|
||||||
|
modem_preset: mapReport.modemPreset,
|
||||||
|
has_default_channel: mapReport.hasDefaultChannel,
|
||||||
|
position_precision: mapReport.positionPrecision,
|
||||||
|
num_online_local_nodes: mapReport.numOnlineLocalNodes,
|
||||||
};
|
};
|
||||||
|
|
||||||
await prisma.node.upsert({
|
await prisma.node.upsert({
|
||||||
|
Reference in New Issue
Block a user