Flesh out of Lanes header, source constructor, method notes.

This commit is contained in:
KaraBun 2022-12-28 00:04:32 -05:00
parent 4e279f1e8c
commit 137eda2a45
2 changed files with 52 additions and 3 deletions

View File

@ -1 +1,37 @@
#include "Lanes.h"
#include "Lanes.h"
/*
private:
int pin;
int pos;
int time;
int track[4][64];
int end;
Table for Expo curve with sign manipulation to alter direction and exp/log. Use linear interpolation to avoid aliasing on slow slopes.
array of function pointers which share index with curve type.
*/
Lane::Lane(int OutputPin){
pin = OutputPin;
analogWrite( pin, 0);
pos = 0;
time = 0;
end = 16;
};
void Lane::Update(int CurrentTime){
};
void Lane::Randomize(){
};
int Lane::Positiion(){
};
void Lane::StepUpdate(int Step, int Voltage, int Curve, int Param){
};
void Lane::EndUpdate(int NewEnd){
};

View File

@ -1,14 +1,27 @@
#ifndef Lanes_h
#define Lanes_h
#include <Arduino.h>
const int CurveTable[2] = {0, 1};
class Lane {
public:
Lane(int Pin);
void output();
Lane(int OutputPin);
void Update(int CurrentTime);
void Randomize();
int Positiion();
void StepUpdate(int Step, int Voltage, int Curve, int Param);
void EndUpdate(int NewEnd);
private:
int pin;
int pos;
int time;
int track[4][64];
int end;
};
#endif