Compare commits

..

No commits in common. "d133664567a675598ad664d55a96e5f40b45a81f" and "8a5f7987802e82520914b26be7d31050cf747c9c" have entirely different histories.

6 changed files with 4 additions and 124 deletions

View File

@ -69,6 +69,7 @@ const char protectString[] = "cimdit:";
/// current position in protection string
uint8_t protectPos = 0;
/// main loop
void loop() {
hal.readFromHardware(outstandingRotInterrupt);
@ -117,7 +118,7 @@ void loop() {
case 'f': // read flash
profile.printFlash();
break;
case 'F': // write flash
case 'F': // write flash
profile.writeFlash();
break;
}

View File

@ -675,11 +675,7 @@ void CimditProfile::printFlash() {
m_eepromPosition = 0;
uint16_t len = nextUInt16();
m_eepromPosition = 0;
#ifdef EXTERNAL_EEPROM
if (len < 32768) {
#else
if (len < 1024) {
#endif
uint8_t in;
for (uint16_t i = 0; i < len; ++i) {
in = nextUInt8();
@ -711,12 +707,11 @@ void CimditProfile::writeFlash() {
#ifdef EXTERNAL_EEPROM
eepromWrite(m_eepromPosition++, len >> 8);
eepromWrite(m_eepromPosition++, len & 255);
if (len < 32768) {
#else
EEPROM.write(m_eepromPosition++, len >> 8);
EEPROM.write(m_eepromPosition++, len & 255);
if (len < 1024) {
#endif
if (len < 1024) {
for (uint16_t i = 2; i < len; ++i) {
while ((buf[0] = Serial.read()) == -1) {
delay(100);
@ -734,9 +729,6 @@ void CimditProfile::writeFlash() {
Serial.println("written");
initProfiles();
}
m_displayState = DISPLAY_BLANK; // to enforce a redraw
showActiveProfile();
return false;
}
void CimditProfile::setUserString(uint8_t timeout, const char* input) {

View File

@ -284,13 +284,7 @@ class CimditProfile {
/// timeout of submitted string
uint32_t m_userTimeout;
/// relative mouse movement X
float m_relMouseX;
/// relative mouse movement Y
float m_relMouseY;
/// offset of custom image
float m_relMouseX, m_relMouseY;
uint16_t m_customImage;
};

View File

@ -322,7 +322,6 @@ class ProfileGenerator {
event.preventDefault();
var input = this.json.value;
var json = {};
this.error.innerHTML = "";
try {
json = JSON.parse(input);
} catch (e) {

View File

@ -498,7 +498,6 @@ var ProfileGenerator = (function () {
event.preventDefault();
var input = this.json.value;
var json = {};
this.error.innerHTML = "";
try {
json = JSON.parse(input);
}

View File

@ -1,105 +0,0 @@
Profile for PulseView, a "portable, cross-platform, Free/Libre/Open-Source signal analysis software suite" sigrok.org
Support for horizontal and vertical scrolling and zoom using rotary encoders.
Push buttons for start/stop recording (button 46), cursors (button 38), fit recording to screen (button 14, on rotary encoder for zoom)
Includes PulseView Logo.
JSON:
{
"name": "PulseView",
"customimage": "000000000000000DB000000000000000000000000000004DB200000000000000000000000000004DB200000000000000000000000000046DB6200000000000000000000000000665A6600000000000000000000000000335ACC00000000000000000000000000337ECC000000000000000000000000061B7ED8600000000000000000000000071FFFF8E00000000000000000000000038DFFB1C0000000000000000000000001EFFFF78000000000000000000000000077FFEE000000000000000000000000003BFFDC000000000000000000000000001FFFF8000000000000000000000000000FFFF00000000000000000000000000007FFE00000000000000000000000000003FFC00000000000000000000000000001FF800000000000000000000000000000FF000000000000000000000000000000FF000000000000000000000000000000FF000000000000000000000000000000FF000000000000000000000000000003FFC00000000000000000000000000007FFE00000000000000000000000000007FFE0000000000000000000000000000FFFF0000000000000000000000000000FFFF0000000000000000000000000000FFFF0000000000000000000000000000FFFF0000000000000000000000000000FFFF00000000000000000000000000007FFF00000000000000000000000000007FFE00000000000000",
"mappedbuttons": [
{
"source": 62,
"type": "SWITCH_PROFILE"
},
{
"source": 46,
"type": "KEYBOARD_BUTTON",
"target": "KEY_SPACE"
},
{
"source": 38,
"type": "KEYBOARD_BUTTON",
"target": "KEY_C"
},
{
"source": 14,
"type": "KEYBOARD_BUTTON",
"target": "KEY_F"
}
],
"mappedaxis": [],
"mappedrotary": [
{
"source": 0,
"type": "PREV_PROFILE"
},
{
"source": 1,
"type": "NEXT_PROFILE"
},
{
"source": 10,
"type": "MOUSE_REL_WHEEL",
"value": 1
},
{
"source": 11,
"type": "MOUSE_REL_WHEEL",
"value": 1
},
{
"source": 12,
"type": "MACRO_PRESS",
"macro": 0
},
{
"source": 13,
"type": "MACRO_PRESS",
"macro": 1
},
{
"source": 14,
"type": "MACRO_PRESS",
"macro": 2
},
{
"source": 15,
"type": "MACRO_PRESS",
"macro": 3
}
],
"macros": [
[
"MACRO_KEY_PRESS",
"KEY_LEFT_ALT",
"MACRO_MOUSE_WHEEL",
-1,
"MACRO_KEY_RELEASE",
"KEY_LEFT_ALT"
],
[
"MACRO_KEY_PRESS",
"KEY_LEFT_ALT",
"MACRO_MOUSE_WHEEL",
1,
"MACRO_KEY_RELEASE",
"KEY_LEFT_ALT"
],
[
"MACRO_KEY_PRESS",
"KEY_LEFT_CTRL",
"MACRO_MOUSE_WHEEL",
1,
"MACRO_KEY_RELEASE",
"KEY_LEFT_CTRL"
],
[
"MACRO_KEY_PRESS",
"KEY_LEFT_CTRL",
"MACRO_MOUSE_WHEEL",
-1,
"MACRO_KEY_RELEASE",
"KEY_LEFT_CTRL"
]
]
}