void WebDB::setButtonId(uint _id, uchar val) { if (_id < getDBButtonMaxRecords()) { recordButton = &m_button; getButtonType(_id); contador = 0; recordButton->value = val; for( int j = getDBButtonStart() + (sizeof(DBButtonRecord) * _id); j < getDBButtonStart() + ((sizeof(DBButtonRecord) * _id) + sizeof(DBButtonRecord)); j++) { EEPROM.write(j, ((uchar*)recordButton)[contador]); contador++; } } }
/* * Class: no_ntnu_stud_torbjovn_comedielevator_NativeInterface * Method: elev_set_button_lamp * Signature: (III)V */ JNIEXPORT void JNICALL Java_no_ntnu_stud_torbjovn_comedielevator_NativeInterface_elev_1set_1button_1lamp (JNIEnv * env, jobject obj, jint button, jint floor, jint value) { elev_set_button_lamp(getButtonType(button), floor, value); }
/* * Class: no_ntnu_stud_torbjovn_comedielevator_NativeInterface * Method: elev_get_button_signal * Signature: (II)I */ JNIEXPORT jint JNICALL Java_no_ntnu_stud_torbjovn_comedielevator_NativeInterface_elev_1get_1button_1signal (JNIEnv * env, jobject obj, jint button, jint floor) { return elev_get_button_signal(getButtonType(button), floor); }