Search found 1913 matches

by mnfisher
Tue Aug 11, 2026 1:05 pm
Forum: Bug Reports
Topic: Properties have variable names instead of description?
Replies: 2
Views: 54

Re: Properties have variable names instead of description?

Thanks Steve,

I must have hit the toggle by mistake sometime... Been running like it for weeks too :-)
by mnfisher
Mon Aug 10, 2026 4:15 pm
Forum: Bug Reports
Topic: Properties have variable names instead of description?
Replies: 2
Views: 54

Properties have variable names instead of description?

It might be a configuration setting - but I've noticed that properties seems to get the variable name displayed rather than the description...
properties.png
properties.png (89.13 KiB) Viewed 54 times
by mnfisher
Mon Aug 03, 2026 8:37 am
Forum: User Components
Topic: Bug Report: GLCD SSD1963 component generates [-Woverflow] warnings and fails on PIC32MX795F512L
Replies: 11
Views: 1088

Re: Bug Report: GLCD SSD1963 component generates [-Woverflow] warnings and fails on PIC32MX795F512L

... The modified component code imports glcd_ssd1963 (parallel) and is using this for the read & write routines (and others).

So modifying this would be one way to go.

Alternatively - as a test - write a tiny component or program to test the display. This doesn't need to be very large - it needs ...
by mnfisher
Sun Aug 02, 2026 3:50 pm
Forum: User Components
Topic: Bug Report: GLCD SSD1963 component generates [-Woverflow] warnings and fails on PIC32MX795F512L
Replies: 11
Views: 1088

Re: Bug Report: GLCD SSD1963 component generates [-Woverflow] warnings and fails on PIC32MX795F512L

I tested this - I modified your component (slightly - gave it a new GUID changed the name) and compiled to SSD_TEST - then compiled the test program having modified it to use the new component and removed the old component. The new component moved to development - with name SSD_TEST

Have no way of ...
by mnfisher
Tue Jul 28, 2026 5:55 pm
Forum: Bug Reports
Topic: Power (pow) returns incorrect result
Replies: 4
Views: 604

Re: Power (pow) returns incorrect result

This might give a solution:


#include <math.h>
#include <stdio.h>

int main()
{
int a, b;

// Using typecasting for
// integer result
a = (int)(pow(5, 2) + 1e-9);
b = round(pow(5,2));
printf("%d \n%d", a, b);

return 0;
}



Which looks to give the correct result on both cases (from ...
by mnfisher
Tue Jul 28, 2026 3:32 pm
Forum: Bug Reports
Topic: Power (pow) returns incorrect result
Replies: 4
Views: 604

Re: Power (pow) returns incorrect result

It might be because it uses floating point...

pow(2, flt_fromi(FCL_I));

- not sure why it doesn't also do flt_fromi(2)?

However - it shouldn't make it so wrong ?

Wrote my own integer
by mnfisher
Tue Jul 28, 2026 3:15 pm
Forum: Bug Reports
Topic: Power (pow) returns incorrect result
Replies: 4
Views: 604

Power (pow) returns incorrect result

Just spent a while chasing a bug in my code - but it turns out 'pow' returns an incorrect value.

It actually returns the result - 1 (except for pow(2, 0) and pow(2, 1))

The attached demonstrates this behaviour (on an Arduino - other devices may differ?):


2**0 = 1
2**1 = 2
2**2 = 3
2**3 = 7
2**4 ...
by mnfisher
Mon Jul 27, 2026 3:48 pm
Forum: Projects - Embedded
Topic: Bitfields in data
Replies: 3
Views: 450

Re: Bitfields in data

I did a quick component - assuming unused macros are optimised away.

This supports SetBitfield8, 16 and 32 (on an 8 bit MCU 16 and 32 bit shifts are rather slower)
GetBitfield8,16 and 32
SetField4bit and GetField4bit - set or retrieve a field using a byte where upper nibble is position and lower ...
by mnfisher
Mon Jul 27, 2026 8:00 am
Forum: Projects - Embedded
Topic: Bitfields in data
Replies: 3
Views: 450

Re: Bitfields in data

And I went with 4 bits (nibbles) each for width and position.

Make every byte count :-)
by mnfisher
Sun Jul 26, 2026 12:25 pm
Forum: Projects - Embedded
Topic: Bitfields in data
Replies: 3
Views: 450

Bitfields in data

Currently I need to use bitfields in some code.

On a PIC I can do REGISTERbits.FIELD = value for register values. I wanted a simple way to do this for variables.

I could define two constants field_start, field_width

.mask = pow(2,field_width) - 1
.value = .value & .mask // Check the value will ...