From 262876983f9a565ae8a3ea5656352d95fe4a9c09 Mon Sep 17 00:00:00 2001 From: Simon Hancock Date: Sat, 10 Feb 2024 17:46:49 +0000 Subject: [PATCH] Mavgen JS: Add require Buffer for React --- generator/mavgen_javascript.py | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/mavgen_javascript.py b/generator/mavgen_javascript.py index 2635b3322..477e82890 100644 --- a/generator/mavgen_javascript.py +++ b/generator/mavgen_javascript.py @@ -39,6 +39,7 @@ def generate_preamble(outf, msgs, args, xml): events = require("events"), // for .emit(..), MAVLink20Processor inherits from events.EventEmitter util = require("util"); +var Buffer = require('buffer').Buffer; // required in react - no impact in node var Long = require('long'); // Add a convenience method to Buffer