stm32: fix stabilizer IP address override

* required by at least 659a6879f7 or later
* also substitutes the default gateway address (24-bit netmask)
This commit is contained in:
Harry Ho 2021-02-01 16:40:28 +08:00
parent 35c2844612
commit 21f5362b6f
1 changed files with 5 additions and 3 deletions

View File

@ -44,9 +44,11 @@ in
name = "stabilizer";
src = <stabilizerSrc>;
patchPhase = ''
substituteInPlace src/main.rs \
--replace "net::wire::IpAddress::v4(10, 0, 16, 99)," \
"net::wire::IpAddress::v4(192, 168, 1, 76),"
substituteInPlace src/hardware/configuration.rs \
--replace "IpAddress::v4(10, 0, 16, 99)" \
"IpAddress::v4(192, 168, 1, 76)" \
--replace "Ipv4Address::new(10, 0, 16, 1)" \
"Ipv4Address::new(192, 168, 1, 1)"
'';
};
thermostat = buildStm32Firmware {