Skip to content

Commit

Permalink
Add ShimmerDataFrame constructor that allows full initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
nightscape committed Feb 4, 2019
1 parent 1b73bde commit 1f14916
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ public ShimmerDataFrame(AbstractSensor fromSensor, double timestamp) {
super(fromSensor, timestamp);
}

public ShimmerDataFrame(AbstractSensor fromSensor, double timestamp, double ecg, double emg, double[] accel, double [] gyro, double[], double[] ecgLR) {
super(fromSensor, timestamp);
this.ecg = ecg;
this.emg = emg;
this.ax = accel[0];
this.ay = accel[1];
this.az = accel[2];
this.gx = gyro[0];
this.gy = gyro[1];
this.gz = gyro[2];
this.ecgLA = ecgLR[0];
this.ecgRA = ecgLR[1];
}

@Override
public double getEcgSample() {
if (isTwoChannelEcg) {
Expand Down

0 comments on commit 1f14916

Please sign in to comment.