Randomised battery.
This commit is contained in:
parent
7d1b4d4537
commit
62e549015e
|
@ -1,4 +1,5 @@
|
||||||
import base64
|
import base64
|
||||||
|
import random
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
|
@ -9,7 +10,7 @@ import numpy as np
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Context:
|
class Context:
|
||||||
battery: int = 55
|
battery: int = field(default_factory=lambda: random.randint(0, 100))
|
||||||
position: Dict[str, float] = field(default_factory=lambda: {'latitude': 53.0, 'longitude': 9.0}) # Denmark somewhere
|
position: Dict[str, float] = field(default_factory=lambda: {'latitude': 53.0, 'longitude': 9.0}) # Denmark somewhere
|
||||||
image: np.ndarray = None
|
image: np.ndarray = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue