-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|58|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-




spinal

N64 Controller Project...

8th September 2023

Modded the code a little for potential speed ups, only by removing function calls to abs().
[code]
#define xPin A2 // select the input pin for the potentiometer
#define yPin A1 // select the input pin for the potentiometer
#define XA 6
#define*snip*


spinal

N64 Controller Project...

8th September 2023

OK, I dug out the arduino code, but I didn't comment it very well so I have gone and forgot that the hell the offset value does...
I'm tempted to think its the difference between the full stick value and the 'correct' full stick value...
*snip*


spinal

SpinalWatch

27th August 2023

OK, got that working as far as I can tell. Now to re-arduino the code.
(Image.png)
[code]
Graphics 320,240,0,2
Global gScale = 1
Global WIDTH = 144
Global font02 = LoadAnimImage(''font.png'', 11, 15, 0, 96)
Dim fWidth(96)
For t = 0 To 95 *snip*


spinal

SpinalWatch

26th August 2023

OK, got the blitz version up to the same problem. I switched to blitz because uploading code to the arduino, then sending myself an sms message is a slow process, wheras hitting F5 is nice and fast.
What I WANT to happen, is that if a single word is too w*snip*


spinal

SpinalWatch

26th August 2023

Here is an attempt in blitz, it nearly works...
font.png
(Image.png)
[code]
Graphics 320,240,0,2
Global WIDTH = 144
Global font02 = LoadAnimImage(''font.png'', 11, 15, 0, 96)
Dim fWidth(96)
For t = 0 To 95
Read fWidth(t)
Next
Rect 0,0*snip*


spinal

SpinalWatch

26th August 2023

This is just getting longer and longer, and still not right.
[code]
void print(int x, int y, const char* text) {
int x1 = x;
int fHeight = 0;
int nextSpace = 0;
uint8_t numChars = strlen(text);
const char* wordStart = text; // Pointer to *snip*


spinal

SpinalWatch

19th August 2023

It's weird, I would manually force the buffer and the copy to be different, but then it would only decide that where I'd put the text was different and the background wouldn't be.
I was calling clearSceeenBuffer() in my setup, so I'd expec*snip*


spinal

SpinalWatch

18th August 2023

OK, Started from scratch, First I got the BLE code working and connecting, no problems yet.
Then I added all of the power saving code, one item at a time and still working (power at 1.9mA).
Left it running for a while, no crashing, sent multiple notifica*snip*


spinal

SpinalWatch

15th August 2023

[code]
inline void drawPixel(int x, int y, uint8_t color){
if(x<0 || y<0 || x>=WIDTH || y>=HEIGHT) return;
uint16_t x8 = x>>3;
if(color > 1){
color = GreyPattern[(x&1)+2*(y&1)];
}
if (color){
sBuff[x8 *snip*


spinal

SpinalWatch

12th August 2023

OK, after leaving it running a while, removing an y code that 'does anything' with the received messages, so my function now looks like this...
[code]
void getMessages(){
bleSerial.poll();
while (bleSerial.availableLines() > 0) {
ch*snip*


spinal

SpinalWatch

12th August 2023

Didn't help, this time it crashed after maybe 12 hours?
Added a RAM counter...
[code]
// quick function to find free memory, it's slow though
long unsigned int freeMem = 0;
long unsigned int availableMemory() {
int size = 128*1024; // We ha*snip*


cyangames

Managing CSS

2nd August 2023

They should have both done testing and then just used a media query, something like
[code]
@media only screen and (max-width:499px){
.sellingdiv span{
min-height: 2em;
max-height: 2em;
height: 2em;
font-size: small;
padding: 10px;
bor*snip*


Kuron

Managing CSS

1st August 2023

Although I use the validator for finished pages, at the last step, it wasn't even on my brain for testing code I am working on. Lesson learned.
I did not write the original code, it is what was produced by WikiWriter and I was modifying it. This is *snip*


cyangames

Managing CSS

1st August 2023

Pro Tip: Indenting CSS (small example below) can help with that sort of error, also this might help debug CSS
(Linkage)
[code]
.clear{
clear: both;
}

.bold{
font-weight: 700;
}

div{
background: #eee;
padding: 10px;
border*snip*


spinal

SpinalWatch

26th July 2023

Turns out it needs a full stop at the end...
[code]
{t:''info'', msg:'Hello World'}.
[/code]
There doesn't seem to be much I'd need to tell the app, but it looks like dismissing notifications or calls will be possible.


spinal

SpinalWatch

26th July 2023

AHA!!
[code]
GadgetBridge said: GB({t:''notify'',id:1690381942,src:''Messages'',title:''Me'',subject:'''',body:''This is a test.'',sender:''''})
GadgetBridge said: GB({t:''notify-'',id:1690381942*snip*


spinal

SpinalWatch

26th July 2023

OK, first attempt to get somewhere...
[code]
BLEBoolCharacteristic myBool(''2A19'', BLERead | BLEWrite | BLENotify);
BLEBooleanCharacteristic myBoolean(''2A19'', BLERead | BLEWrite | BLENotify);
BLECharCharacteristic myChar(''2A19&q*snip*


spinal

Font list

24th July 2023

OK, I tried a little something to verify the font before adding to the list. Simply attempt to load it, apparently if the font system fails to load for whatever reason or returns 0.
However, some fonts seem to not load, but don't return 0, it does say*snip*


spinal

Font list

24th July 2023

I'm doing a font maker to go with my watch project, but having a couple of issues. I'm trying to get a list of all fonts installed on my computer. I do this by reading the registry and creating a text file with a list of fonts. Then I go through th*snip*


cyangames

Kuron's web related questions?

17th July 2023

I would have thought eiter a database or flatfile solution would be pretty effective to serve up a quote of the day with speed. If you're using PHP you could use something like....
[code]
<?php
echo file_get_contents(''qotd/''.date(''*snip*


spinal

SpinalWatch

16th July 2023

[code]
_____ ____ ____ _ __ __ ______ __ __ __
/ ___/| \\| \\ | | | |__| || | / ]| | |
( \\_ | o ) || | | | | || | / / | | |
\\__ || _/| | || |___ | | | ||_| |_|/ / | |
/ \\ ||*snip*


spinal

SpinalWatch

5th July 2023

The problem I have, is that it's something I've done hundreds of times, but just can't see whats wrong.
[edit] Oh, hang on.....
[code] if(t == menuItem) indent=16; [/code]
Yup, I'm an idiot.


spinal

SpinalWatch

5th July 2023

[code]
int listMax = sizeof (menuText) / sizeof (menuText[0]);
int listStart = menuItem - 2;
if(listStart<0) listStart=0;
int listEnd = listStart+4;
if (listEnd>listMax) {
listEnd=listMax;
listStart=listEnd-4;
if(listSta*snip*


Jayenkai

SpinalWatch

5th July 2023

What is/isn't happening?
I'd at least add a catch for listEnd, to stop the listStart going further than 4-positions from the end.
[code]if (listEnd>listMax) {
listEnd=listMax;
listStart=listEnd-4;
if(listStart<0) listStart=0;
}*snip*


spinal

SpinalWatch

5th July 2023

bloody hell, I've forgot how to do a simple scrolling menu...
My brain can't see whats wrong here :-(
[code]
int listMax = sizeof (menuText) / sizeof (menuText[0]);
int listStart = menuItem - 2;
if(listStart<0) listStart=0;
int lis*snip*

Newer Posts More - Older Posts