Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use heapless::{String, Vec};
#[derive(Debug, Clone)]
pub struct Contact {
callsign: String<10>,
ssid: u8,
pub name: String<30>,
}
#[derive(Debug)]
pub struct ContactGroup {
pub contacts: Vec<Contact, 20>,
}
impl Default for ContactGroup {
fn default() -> Self {
let mut contacts = Vec::new();
contacts
.push(Contact {
callsign: String::try_from("VA3QAK").unwrap(),
ssid: 19,
name: String::try_from("Adrian").unwrap(),
})
.unwrap();
contacts
.push(Contact {
callsign: String::try_from("VE3SVF").unwrap(),
ssid: 239,
name: String::try_from("Sasha").unwrap(),
})
.unwrap();
contacts
.push(Contact {
callsign: String::try_from("VE3KCN").unwrap(),
ssid: 19,
name: String::try_from("Cam").unwrap(),
})
.unwrap();
Self { contacts }
}
}