From 843a28663114e3e52bd04b8faff6dc6af83dd982 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 7 Apr 2026 07:04:53 +0900 Subject: [PATCH] Remove multicast socket polling, fix USB responsiveness --- firmware/firmware.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/firmware/firmware.cpp b/firmware/firmware.cpp index 7b637bb..25934d6 100644 --- a/firmware/firmware.cpp +++ b/firmware/firmware.cpp @@ -1,17 +1,8 @@ #include "dispatch.h" #include "handlers.h" -#include "w6300.h" std::string_view firmware_name = "picomap"; -static constexpr uint16_t PICOMAP_DISCOVERY_PORT = 28777; - -static constexpr std::array picomap_discovery_ip = {239, 0, 112, 109}; - -static constexpr std::array picomap_discovery_mac = { - 0x01, 0x00, 0x5e, 0x00, 0x70, 0x6d, -}; - static constexpr handler_entry handlers[] = { {RequestPICOBOOT::ext_id, handle_picoboot}, {RequestInfo::ext_id, handle_info}, @@ -19,17 +10,5 @@ static constexpr handler_entry handlers[] = { int main() { dispatch_init(); - - auto sn = w6300::socket_id{1}; - w6300::set_socket_dest_mac(sn, picomap_discovery_mac); - w6300::ip_address addr = {}; - std::copy(picomap_discovery_ip.begin(), picomap_discovery_ip.end(), addr.ip.begin()); - addr.len = 4; - w6300::set_socket_dest_ip(sn, addr); - w6300::set_socket_dest_port(sn, w6300::port_num{PICOMAP_DISCOVERY_PORT}); - w6300::open_socket(sn, w6300::protocol::udp, w6300::port_num{PICOMAP_DISCOVERY_PORT}, - w6300::sock_flag::multi_enable); - - w6300::socket_id sockets[] = {sn}; - dispatch_run(handlers, sockets); + dispatch_run(handlers); }