From 21f5362b6ff9f2f47884c311cf62ceb7eaf53823 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Mon, 1 Feb 2021 16:40:28 +0800 Subject: [PATCH] stm32: fix stabilizer IP address override * required by at least https://github.com/quartiq/stabilizer/commit/659a6879f7b78495bb4b3dbd3f7047298ea7c1d0 or later * also substitutes the default gateway address (24-bit netmask) --- stm32/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stm32/default.nix b/stm32/default.nix index d6ce761..90dd57e 100644 --- a/stm32/default.nix +++ b/stm32/default.nix @@ -44,9 +44,11 @@ in name = "stabilizer"; src = ; 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 {