package com.uxxu.konashi.lib.stores;

/**
 * Created by izumin on 9/18/15.
 */
public class PwmStore {
    private static final int PWM_LENGTH = 8;

    private int mPwmModes = 0;
    private int[] mPwmPeriods = new int[PWM_LENGTH];
    private int[] mPwmDuties = new int[PWM_LENGTH];

    public int getPwmModes() {
        return mPwmModes;
    }

    public void setPwmModes(int modes) {
        mPwmModes = modes;
    }

    public int getPwmPeriod(int pin) {
        return mPwmPeriods[pin];
    }

    public void setPwmPeriod(int pin, int period) {
        mPwmPeriods[pin] = period;
    }

    public int getPwmDuty(int pin) {
        return mPwmDuties[pin];
    }

    public void setPwmDuty(int pin, int duty) {
        mPwmDuties[pin] = duty;
    }
}

@@ -31,16 +31,138 @@
 tores;%0A%0A
+import com.uxxu.konashi.lib.dispatcher.CharacteristicDispatcher;%0Aimport com.uxxu.konashi.lib.dispatcher.PwmStoreUpdater;%0A%0A
 /**%0A * C
@@ -216,16 +216,33 @@
 wmStore 
+implements Store 
 %7B%0A    pr
@@ -418,16 +418,144 @@
 NGTH%5D;%0A%0A
+    public PwmStore(CharacteristicDispatcher%3CPwmStore, PwmStoreUpdater%3E dispatcher) %7B%0A        dispatcher.setStore(this);%0A    %7D%0A%0A
     publ

Make PwmStore implements Store