cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a variable float to const float

methee_c
Associate III

Dear All,

I compile a program with cube ide and would like to know how the float variable is const float.

sample is. 

float a

const float  b

b = a;

BR,

Methee

12 REPLIES 12

And I can't edit or pull code from a screen shot/bitmap.

Make a structure you're configuration items live in.

Create routines to read, write and validate this structure you can place in FLASH or EEPROM

FOO foo = { 0 };

void InitFoo(FOO *foo, EEPROM *eeprom)
{
...
  foo->donkeys = 12;
  foo->freqHz = eeprom->freqHz;
  foo->speedRPM = eeprom->speedRPM;  
...
}

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I will keep trying,
My project needs to set parameters from a keypad.

Ok,Thanks  you