Comments (10)
This is badly needed!
Original comment by [email protected]
on 26 Jan 2012 at 2:04
from m2tklib.
implementation started:
uint8_t u8_x = 2;
uint8_t u8_cb(m2_el_fnarg_p fnarg, uint8_t msg, uint8_t val)
{
if ( msg == M2_U8_MSG_SET_VALUE )
u8_x = val;
return u8_x;
}
#define M2_U8_MSG_GET_VALUE 0
#define M2_U8_MSG_SET_VALUE 1
M2_U8NUMFN(el,fmt,min,max,fn)
documentation: SET_VALUE is only called, if value has really changed
Original comment by [email protected]
on 26 Jan 2012 at 10:34
- Changed state: Started
from m2tklib.
changed first arg to the element pointer (to be consistent between u8 and u32)
started with u32 (testing needed)
Original comment by [email protected]
on 27 Jan 2012 at 5:53
from m2tklib.
- write u32 test case, check the code
- rewrite u8 procedure, remove el_data, use runtime object type identification
as in u32 code
Original comment by [email protected]
on 27 Jan 2012 at 8:16
from m2tklib.
implemented, documentation needs to be done
Original comment by [email protected]
on 27 Jan 2012 at 9:33
from m2tklib.
done
Original comment by [email protected]
on 28 Jan 2012 at 8:26
- Changed state: Verified
from m2tklib.
Seem to make problems with classes - get error: "a pointer to a bound function
my only be used to call the function"
This works:
uint8_t u8_cb(m2_rom_void_p element, uint8_t msg, uint8_t val)
{
if ( msg == M2_U8_MSG_SET_VALUE )
global_value = val;
return global_value;
}
M2_U8NUMFN(el_Frost_aktiv_num,"c2", 1, 20, u8_cb );
This does not work:
class testclass {
public:
uint8_t u8_cb(m2_rom_void_p element, uint8_t msg, uint8_t val);
};
uint8_t testclass::u8_cb(m2_rom_void_p element, uint8_t msg, uint8_t val)
{
if ( msg == M2_U8_MSG_SET_VALUE )
global_value = val;
return global_value;
}
testclass test;
M2_U8NUMFN(el_Frost_aktiv_num,"c2", 1, 20, test.u8_cb );
Any ideas?
Original comment by [email protected]
on 30 Jan 2012 at 2:14
from m2tklib.
This is not possible:
http://www.parashift.com/c++-faq-lite/pointers-to-members.html
Original comment by [email protected]
on 30 Jan 2012 at 3:54
from m2tklib.
This will not work. Member functions be not be passed directly (see also the
C++ FAQ)
Original comment by [email protected]
on 30 Jan 2012 at 4:02
from m2tklib.
OK I got it - Thanks
Original comment by [email protected]
on 30 Jan 2012 at 4:18
from m2tklib.
Related Issues (20)
- u8g: text left right border also for normal / none highlight text HOT 1
- finish u8gref wiki page HOT 1
- additional space for LABEL HOT 1
- Enhanced STRLIST HOT 4
- m2lab for windows HOT 2
- overview of all options HOT 1
- make the readonly boarder switchable to the normal border HOT 1
- U8NUM field width calculation HOT 1
- pff startup HOT 1
- m2tklib avr version HOT 3
- updates avr studio 6 HOT 2
- menu callback for STRLIST HOT 2
- Use console as event handler and output device HOT 7
- 2LMENU HOT 5
- FileSelect HOT 4
- add petit file system to m2tklib release HOT 6
- update doglcd with the new file selection box procedures HOT 3
- mas.h/pff.h and arduino release HOT 3
- rename 2LMenu HOT 3
- mas_dev_sd is missing in the arduino release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m2tklib.