Skip to content

ArduPilot Dataflash log parser for Go

License

Notifications You must be signed in to change notification settings

ornen/go-dataflash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-dataflash

This is a Dataflash log parser for Go.

Example

The following example parses a dataflash log file and prints the messages.

package main

import (
	"io"
	"log"
	"os"

	"github.com/ornen/go-dataflash"
)

func main() {
	input, err := os.Open("test.bin")

	if err != nil {
		log.Fatal(err)
	}

	defer input.Close()

	var reader = dataflash.NewReader(input)

	for {
		var message, err = reader.Read()

		if err != nil {
			if err == io.EOF {
				break
			} else {
				log.Println(err)
				continue
			}
		}

		log.Println(message)
	}
}

License

This code is licensed under the Apache License 2.0.

About

ArduPilot Dataflash log parser for Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages