meshtastic / design

Visual communication of the meshtastic project
GNU General Public License v3.0
12 stars 8 forks source link

Visible Info Before a NodeInfo Arrives #16

Open garthvh opened 1 month ago

garthvh commented 1 month ago

When we get a packet from a nodenum that is not in the client database we should create starting data in a consistent way, matching the initial setup in the firmware.

The node num is a UInt32 value representing part of the Mac address, with this data we can generate the BLE name, Default Short and Long Name and user.ID

This is the swift method used to create a user from a node num

  public func createUser(num: Int64, context: NSManagedObjectContext) -> UserEntity {
        let newUser = UserEntity(context: context)
        newUser.num = Int64(num)
        let userId = String(format:"%2X", num)
        newUser.userId = "!\(userId)"
        let last4 = String(userId.suffix(4))
        newUser.longName = "Meshtastic \(last4)"
        newUser.shortName = last4
        newUser.hwModel = "UNSET"
        return newUser
  }
garthvh commented 1 month ago

image

After some conversation decided to show Incomplete and A person icon with a question mark when we have a incomplete user