Code Monkey home page Code Monkey logo

mawt's Introduction

mawt - A ray of light

0.1.0-feature-01-techthulu-events-1f3aTX

This software implements a server that parses input from a Niantic Tecthulhu and uses it to build OPC frames that are then sent to another TCP/IP server.

Prerequistes

mawt relies upon the presence of the fadecandy server that accepts TCP/IP messages and interfaces with the USB based hardware controllers. The fade candy server can be downloaded as a single binary and run as documented later in this README file. The binary is available for Linux, Windows and OSX from https://github.com/scanlime/fadecandy/releases/tag/package-02. The compressed archives in these releases contain the binaries for the server inside the fc-server/bin directory.

mawt is compiled using golang 1.10.2 or later. Using apt-get to install golang can be made to work if the package expression is used correctly to set the specific version needed. In some cases however the presence of an older version of go if installed into the users local environment will override the system version. Versions on Ubuntu 14.06 or above and go versions 1.9 and below often took this approach. To deal with local installs you will need to delete the existing go installation, typically in ~/go and then download a new version tar unarchive from the golang.org website and unpack it into the same location, or at this point use apt-get to retrieve the latest version.

Source code preparation

cd ~
mkdir -p mawt/src/github.com/TeamNorCal/
export GOPATH=~/mawt
export PATH=$GOPATH/bin:$PATH
cd mawt/src/github.com/TeamNorCal/
git clone https://github.com/TeamNorCal/mawt
cd mawt
go get -u github.com/golang/dep
go install github.com/golang/dep/cmd/dep
go get github.com/karlmutch/duat
go install github.com/karlmutch/duat/cmd/semver
go install github.com/karlmutch/duat/cmd/github-release
go install github.com/karlmutch/duat/cmd/stencil

Build instructions

sudo apt-get install golang-go
sudo apt-get install -y portaudio19-dev libasound2-dev libvorbis-dev alsa-utils alsa-tools alsa-oss alsaplayer mpg321 alsaplayer-alsa alsa-base
go run build.go

Running mawt

LOGXI=*=DBG /home/pi/mawt/bin/mawt

mawt supports testing without fadecandy devices by specifying the -server option with the value /dev/null.

Using the 2018 test server for tecthulhu messages can be done using the -tecthulhus option with the value http://operation-wigwam.ingress.com:8080/v1/test-info.

Running the simulator using scenario files

LOGXI=*=DBG go run cmd/simulator/*.go -path assets/simulator/portal_builds

fcserver configuration

fcserver should be run using the following config.json file

{
    "listen": ["0.0.0.0", 7890],
    "relay":  [null, 7891],
    "verbose": true,

    "color": {
        "gamma": 2.5,
        "whitepoint": [1.0, 1.0, 1.0]
    },

    "devices": [
        {
            "type": "fadecandy",
            "serial": "AMWPGCSIYCRCKYHL",
            "map": [
                [ 1, 0, 0, 64 ],
                [ 2, 0, 64, 64 ],
                [ 3, 0, 128, 64 ],
                [ 4, 0, 192, 64 ],
                [ 6, 0, 256, 64 ],
                [ 7, 0, 320, 64 ],
                [ 8, 0, 384, 64 ],
                [ 9, 0, 448, 64 ]
            ]
        }
    ]
}

mawt's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mfrank2016

mawt's Issues

Measure and improve CPU consumption

As a engineer
I want to measure the consumption of CPU for the debugger and other intensive code areas
In order that the right areas can be chosen for optimization

Use the golang pprof tooling to select hot code areas for further improvements. Memory consumption does not appear to be very volatile and stable so we need to find where the CPU hot spots are and just changes those areas.

Test 24 emulated strips as will be expected in production

As a user of the mawt server
I want to have a universe of three fadecandy devices with all strips populated defined and tested
In order that the production setup can be validated via the color debugging display prior to hardware being fully available

Emulate the production setup without hardware using the LED strip display that is built into mawt, with a slow display refresh, or a TUI added with high display rate while leaving the internal refresh rate at the production rate.

Measure the blocking and concurrency using a Pi 3 along with using the Linux version for validation and profiling.

LED Test listener

As a developer and integrator
I want to be able to use a small 8 position LED stick with resonator level based on LED brightness with faction colors
In order that a simple fade-candy integration test can be run during development and onsite testing

Typically run with the simulator

Integrate with animation package

As an observer of the portal
I want to have the portal integrate with the TeamNorCal animation library
In order that the portal can animate based on state changes without needing the hard coded test suite

Ingress Techthulu event stream consumer

As a techthulu client
I want to be able to ingest a techthulu data stream
In order that events related to Ingress portal state changes can be propagated to listeners using structured events

Cache steps and sequences if possible

As a provider of animation sequences for a mawt based portal
I want to have animations loaded once and reused
In order that sequences have low overhead

Sequences and animations within the portal as currently envisioned are quite short in duration. They can also be repeated frequently. They should be cached by the mawt server based upon either input files or as code and reused if possible.

Sound effects based on portal state

As a portal server
I want to generate precanned sound effects
In order that observers will hear sound effects in response to portal state changes

Detailed led test sequence

As a tester
I want to have the generator for test sequences bundled into mawt
In order that test cases for per resonator levels and captures can be implemented

Add intermediate animation steps for red flash immediately prior to a portal entering the neutral state

As an observer
I want to see a red flash prior to portals going to complete neutral
In order that the facility for short time-span special effects can be validated

Might require improved debugging running at a faster refresh rate
Might require validation of as yet unused timing and sequence functions in the animation library
Requires state tracking and probable reorganization of the existing animation code which is essentially stateless

Improve build, install and deploy instructions

As a user of the Tecthulhu Pi servers
I want to be able to use the README.md instruction for full deployment
In order that testing can be done

Improve instructions to detail adding a fadecandy server to run as a daemon, along with the mawt server in headless mode. Also document the tecthulhu simulator by retrieving the old documentation and adding anything needed to get the simulator able to run without intervention for exercising things.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.