From a08f9f3f609d3880c20b2ad1c38fc49660eec9ed Mon Sep 17 00:00:00 2001 From: Minizbot2012 Date: Wed, 10 Feb 2021 12:51:13 -0500 Subject: [PATCH] generic PKM KM Loader --- devices/devicejson.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/devices/devicejson.go b/devices/devicejson.go index 95b59f2..53f3cf4 100644 --- a/devices/devicejson.go +++ b/devices/devicejson.go @@ -1,6 +1,11 @@ package devices -import "github.com/OrbTools/OrbCommon/gui" +import ( + "encoding/binary" + "io" + + "github.com/OrbTools/OrbCommon/gui" +) //ExtraBytes defines extra bytes to a type type ExtraBytes struct { @@ -19,3 +24,9 @@ type Device struct { var DeviceList = []string{ "Orbweaver", } + +//SavePKMKeymap saves an orb after edit +func SavePKMKeymap(mapped interface{}, file io.WriteCloser) { + binary.Write(file, binary.LittleEndian, mapped) + file.Close() +}