Show Posts
Pages: 1 ... 3 4 [5] 6
61  Using Arduino / Programming Questions / Re: struct and arrray size on: June 22, 2012, 04:30:47 pm
ok thanks majenko!
i will define a maximal for my use case!
62  Using Arduino / Programming Questions / struct and arrray size on: June 22, 2012, 03:28:52 pm
Hey @all,

i would love to know how to set up a struct with some arrays.
the challenging is, that the array size is not know.
The Idea is as following:
there is this really cool MultiMap function (http://arduino.cc/playground/Main/MultiMap)
and my idea was to build a struct that holds all needed things for a nice mapping:
Code:
struct sMultiMapStruct
{
word mm_In [];
word mm_Out [];
byte size;
};

typedef struct sMultiMapStruct tmm;

for testing:
Code:
/****************************************************************************************************
  *   structTest sketch
  *   
  *   
  *   Created:  22.06.2012
  *   copyright by Stefan Krueger
  *   written by Stefan Krueger stefan@s-light.eu
  *   
  *   Last modified: 22.06.2012 21:00
  *   By Stefan Krueger
  *   stefan@s-light.eu
  *   
  *   changelog / history :
  *
  *
****************************************************************************************************/


struct sMultiMapStruct
{
word mm_In [];
word mm_Out [];
byte size;
};

typedef struct sMultiMapStruct multiMap_type;


multiMap_type mmMyMap = {
{  0, 20,  30},
{  0, 80, 100},
3
};





/**
  * MultiMap
  * http://arduino.cc/playground/Main/MultiMap
  *  modified for 16bit word datatype
  **/
word multiMap(word val, word* _in, word* _out, uint8_t size)
{
  // take care the value is within range
  // val = constrain(val, _in[0], _in[size-1]);
  if (val <= _in[0]) return _out[0];
  if (val >= _in[size-1]) return _out[size-1];

  // search right interval
  uint8_t pos = 1;  // _in[0] allready tested
  while(val > _in[pos]) pos++;

  // this will handle all exact "points" in the _in array
  if (val == _in[pos]) return _out[pos];

  // interpolate in the right segment for the rest
  return map(val, _in[pos-1], _in[pos], _out[pos-1], _out[pos]);
}


/**  struct sMultiMapStruct used so you need no headerfile for struct definition **/
word mapIt(word wInputValue, struct sMultiMapStruct* mmTheMap)
{
// '(*mmTheMap).mm_In' could be also written as 'mmTheMap->mm_In'
return multiMap(wInputValue, (*mmTheMap).mm_In, (*mmTheMap).mm_Out, (*mmTheMap).size);
}


/***************************************************************************************************/
void setup() 
{
/**************************************************/
/* Welcom @ This Sketch!!                         */
/**************************************************/
Serial.begin(115200);
Serial.println();
Serial.println("       ");
Serial.println("   oo  ");
Serial.println("  (  ) ");
Serial.println("   ^^  ");
Serial.println();
Serial.println("Welcome to structTest Sketch!");
Serial.println("system is starting!");
Serial.println(":-)");
Serial.println("");
}

void loop()
{
for ( word x = 0; x < 30; x++)
{
Serial.print(x);
Serial.print("-->");
Serial.println(mapIt(x, &mmMyMap ));
//delay(10);
if ( x == 20 )
{
Serial.println("*** 20 ***");
delay(100);
}
}

Serial.println();
delay(500);
Serial.println("**************************************");
delay(500);
Serial.println();
delay(500);
Serial.println("**************************************");
delay(500);
Serial.println();
delay(500);
Serial.println("**************************************");
delay(500);
Serial.println();
}
(

now the problem is - i try to setup the size of the arrays at declaration of the variable.
error:
Code:
structTest:32: error: too many initializers for 'word [0]'
structTest:32: error: too many initializers for 'word [0]'

is there some easy possibilities to do this an other way?

sunny greetings

stefan
63  Using Arduino / Project Guidance / Re: BPM Counter / Metronome for triggering a DMX console - need a little help on: June 18, 2012, 03:24:15 pm
Hi Helmuth,

i have not read the hole code.
but here are some ideas about timing:
lcds uses normally 'really much time' :-)
and also float calculation is slow:
Reference:Float
Quote from: Arduino Reference - Float
Floating point math is also much slower than integer math in performing calculations, so should be avoided if, for example, a loop has to run at top speed for a critical timing function. Programmers often go to some lengths to convert floating point calculations to integer math to increase speed.
as example - if you need some accuracy like 1.3 you can use 13 as int and know that you have to divide by 10...
so in the last step before printing it on serial or lcd you can print the right value :
13/10 = 1  ( 13 divided by 10 in integer math gives 1)
            .
13%10 = 3  ( 13 modulo 10 (the rest of the division) is 3)


it would help if you just write up a smal overview about how you think it should work - something like an 'flowchart'
then it is faster for others to look through the code.
just write something like:
read input of Pushbutton1
count up
write lcd message
 - status
 - name of the day
make a tone
...

its just an idea-
i will look into your code in the next days-

some general thing - you could give your variables some cleaner naming scheme:
i name them something like this:
Code:
// Pin Definitions
byte pin_PushButton_Up = 1;
byte pin_PushButton_Down = 2;
byte pin_LightSensor = A1;

// Light Sensor
word wLightSensor_Raw = 0;
word wLightSensor_Filtert = 0;

// PushButton States
byte bPushButton_State_Up = 0; // is > 1 if Button is Active; is >2 if Button is Pressed a long time
byte bPushButton_State_Down = 0; // is > 1 if Button is Active; is >2 if Button is Pressed a long time
and hey - thats just how i like it^^
there will be others that hate so long variable names ;-)

i think there will be some nice 'code style guides' out there in the net..

for me its easy to understand what i can do with the thing i just ride down..

sunny greetings

stefan
64  Using Arduino / Programming Questions / Re: library: const declaration how to do right? on: June 17, 2012, 06:42:03 am
the idea was to define all things const that can not change -so that the compiler could do some cleanup or something like this..
so if i mark the constructor arguments as const nothing changes in the errors.
Code:
MotorFaderControl::MotorFaderControl( const byte cbPin_ServoTrack, const byte cbPin_Direction, const byte cbPin_Speed, const byte cbPin_Break)

is it the wrong way to declare the members constant?

and yes the 'error: assignment of read-only data-member 'MotorFaderControl::xxx' is clear - but i dont know how to set the 'const' in an other way...
i hope my approach is clear?!
65  Using Arduino / Programming Questions / Re: library: const declaration how to do right? on: June 17, 2012, 06:16:19 am
Sorrry - thats the fool of copy and paste and try to make things easy to understand -
thanks PaulS for the correction - i will edit the original post - it  is the same error white some more definitions..^^
'right' errors:
Code:
MotorFaderControl.cpp: In constructor 'MotorFaderControl::MotorFaderControl(byte, byte, byte, byte)':
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_ServoTrack' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Direction' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Speed' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Break' with 'const' type 'const byte'
..
MotorFaderControl.cpp:66: error: assignment of read-only data-member 'MotorFaderControl::pin_ServoTrack'
MotorFaderControl.cpp:68: error: assignment of read-only data-member 'MotorFaderControl::pin_Direction'
MotorFaderControl.cpp:69: error: assignment of read-only data-member 'MotorFaderControl::pin_Speed'
MotorFaderControl.cpp:70: error: assignment of read-only data-member 'MotorFaderControl::pin_Break'
66  Using Arduino / Programming Questions / library: const declaration how to do right? on: June 17, 2012, 05:24:50 am
Hi Community,

iam writing a Library out of my developing sketch - (transfer functionality to library thing)

my problem is - i want to use constants to define the used pins of an object of the library.

so i declared constant variables in my 'MotorFaderControl.h' file like this:
Code:
/**
 * Class Definition:
 **/
class MotorFaderControl
{
public: // public methods
//Constructor
MotorFaderControl(byte iPin_ServoTrack, byte iPin_Direction, byte iPin_Speed, byte iPin_Break);
//Destructor
~MotorFaderControl();
// get Current Position
word getCurrentPosition();
private: // per object data
const byte pin_ServoTrack;
const byte pin_Direction;
const byte pin_Speed;
const byte pin_Break;
word wCurrentPosition;
unsigned long ulTimeLastAction;
// private methods
word getPosDif(word wValue1, word wValue2);
};
in the .cpp file i want to set them this way:
Code:
MotorFaderControl::MotorFaderControl(byte bPin_ServoTrack, byte bPin_Direction, byte bPin_Speed, byte bPin_Break)
{
pin_ServoTrack = bPin_ServoTrack;
pin_Direction = bPin_Direction;
pin_Speed = bPin_Speed;
pin_Break = bPin_Break;

wCurrentPosition = 0;
ulTimeLastAction = 0;

/* I have read that this initialization should be not in the Contstructor but better in an 'begin' function.
pinMode(pin_ServoTrack, INPUT);
pinMode(pin_Direction, OUTPUT );
pinMode(pin_Speed, OUTPUT );
pinMode(pin_Break, OUTPUT );
ulTimeLastAction = millis();*/
}
but when i try to compile my library-test sketch
Code:

/****************************************************************************************************
   MotorFaderControl Library Test sketch
   This sketch should Control a Motor of a Motorfader.
  
   Created:  09.06.2012
   copyright by Stefan Krueger
   written by Stefan Krueger s-light.eu
  
   Last modified: 17.06.2012 12:00
   By Stefan Krueger s-light.eu
  
   changelog / history :
   09.06.2012 00:00  created library out of developing project 'Motorfader_Test_2012_06_09__11_45__v17.ino'
   09.06.2012 15:30  created test sketch
   10.06.2012 12:00  first tests
    
****************************************************************************************************/

#include <MotorFaderControl.h>

/**
  * Fader
  * Constructor : (byte bPin_ServoTrack, byte bPin_Direction, byte bPin_Speed, byte bPin_Break);
  **/
MotorFaderControl myMFC_Fader1(A2, 12,  3, 9);
MotorFaderControl myMFC_Fader2(A3, 13, 11, 8);

void setup()  
{
/**************************************************/
/* Setup Pins                                     */
/**************************************************/


/**************************************************/
/* Initialise all the Variables                   */
/**************************************************/

//myMFC_Fader1.begin();
//myMFC_Fader1.begin();

/**************************************************/
/* Welcom @ Start Up!                             */
/**************************************************/

Serial.begin(9600);
Serial.println();
Serial.println("Welcome to MotorFaderControl Library Test Sketch!");
Serial.println("system is starting.!");
Serial.println(":-)");
Serial.println();
Serial.println("Go!");
}

void loop()
{
delay(500);
}
i get the following errors:
Code:
MotorFaderControl.cpp: In constructor 'MotorFaderControl::MotorFaderControl(byte, byte, byte, byte)':
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_ServoTrack' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Direction' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Speed' with 'const' type 'const byte'
MotorFaderControl.cpp:56: error: uninitialized member 'MotorFaderControl::pin_Break' with 'const' type 'const byte'
..
MotorFaderControl.cpp:66: error: assignment of read-only data-member 'MotorFaderControl::pin_ServoTrack'
MotorFaderControl.cpp:68: error: assignment of read-only data-member 'MotorFaderControl::pin_Direction'
MotorFaderControl.cpp:69: error: assignment of read-only data-member 'MotorFaderControl::pin_Speed'
MotorFaderControl.cpp:70: error: assignment of read-only data-member 'MotorFaderControl::pin_Break'

if i understand this thread right - it was the same / similar problem -
but i dont understand how to get this to work for me -

can someone help to understand the thing?
what is the right way to get the idea of use constant declarations to work with the library and the constructor initialization?!

sunny greetings
stefan

[edit]thanks to PaulS i had the wrong error messages copied.. now thats right..[/edit]
67  Development / Suggestions for the Arduino Project / [Bug] Change sketchbook - libraries not reloaded on: June 17, 2012, 02:49:31 am
Hey community,

i have noticed a small bug in the arduino ide version 1.0.1:
if you change the sketchbook folder the ide reloads the new file structure but not the new libraries existing in this folder ?!

and small feature request:
would it be possible to have an dialog at startup asking which of the last 5 sketchbook locations you want to use this time?
the background is, i have a fix folder structure on the hard-disk - something like
home projects
- project 1
  * arduinosketchbook
  * infos
  * datasheets
- project 2
  * arduinosketchbook
  * infos
  * datasheets
- project 3
  * arduinosketchbook
  * infos
  * datasheets

so it would be cool to easily switch between my projects..


sunny greetings
stefan
68  Development / Suggestions for the Arduino Project / Re: What do you guys think of a web-based Arduino IDE? on: June 17, 2012, 02:38:52 am
Hey,

i think it is an cool idea - for an cool editor look at http://ace.ajax.org/
and for the upload thing:
it would be easy for the user to just download a small app for the browser he is using.
so if it would be possible to pack the avr upload things in the app - great thing..
for me as an sometimes proffessional user - i don't want to upload the code somewhere -
so it would be great to have an  'easy to install' server for the own editor system - or the complete compiler system in the app -
this would be cool - i often work together with colleges and if every body could look and use the latest versions ... dream on

sunny greetings
stefan


69  Community / Website and Forum / Ethernet : UDP.write() --> some additional hints / infos on: May 11, 2012, 05:16:02 am
Hello Community,

i wanted to use UDP.write() to send some byte arrays.
the Reference page only shows the way to do it for strings (char arrays).
after some searching i found that
Code:
byte bTmp[] = {0, 11, 200, 1, 0, 1};
UDP.write(bTmp, 6);
works :-)
how about just to add the info about what you have to do to use an other type of message ?!
if there is a way to directly add such informations or an other place to post this infos let me know.

sunny greetings
stefan
70  Using Arduino / Displays / Re: U8glib on: April 13, 2012, 07:00:45 am
Hi Oliver,

is there some pitfall in get your lib running on an Arduino Mega 2560 with an EA DOGXL-160 ? ;-)

if tried it yesterday and it did not work. i looked at the signals of the pins (with an oscilloscope) and the clock pin was a little bit confusing.
in Hardware SPI Mode the signal was realy destroyed.
in Software SPI Mode the u8g.setContrast(127); worked. but the 'hello World' not.
It looked like something is setting the clock pin manually some times..
the signal of the clock was at ~3.3V level out of the arduino and the odd spikes were at 5V level...
i used the Hardware SPI Pins on the Arduino Mega - see constructor..

i used the example hello world sketch and added the contrast command in setup.
my constructors that i tried were the following:
Code:
//U8GLIB_DOGXL160_2X_BW u8g(52, 51, 53, 49);            // Software SPI ARDUINO MEGA   SPI Com: SCK = 52, MOSI = 51, CS = SS = 53, A0 = 49 //there is something wrong...
U8GLIB_DOGXL160_2X_BW u8g(53, 49);            // Hardware SPI ARDUINO MEGA   SPI Com: SCK = 52, MOSI = 51, CS = SS = 53, A0 = 49 // here is something wrong too

have you got an idea?

know i will try it with an arduino Duemilanove. we will see :-)

sunny greetings

Stefan
71  Community / Website and Forum / ATmega2560-Arduino Pin Mapping on: April 12, 2012, 03:22:01 am
Hi Community,

in the last days i am working on an project using the Arduino Mega 2560. On planning my Pin using i found some bugs in the ATmega2560-Arduino Pin Mapping.
if i get it right there are some labels (such as PWM) in the 'Mapped Pin Name' at the wrong row ( its an mixed up which pin numbers are the right one...)
in the Attachment is an OpenOffice Calc and PDF file with the corrected Table. ( I hope so ;-) )
I will also post it here as tab separated table :
Code:
Arduino Mega 2560 PIN mapping table
ATmega 2560 Pin out Arduino Mega
Function
NR Name Function Function Function Mapped Pin Name Function Function Datasheet
1 PG5 OC0B Digital pin 04 PWM
2 PE0 RXD0 PCINT8 Digital pin 00 RX0 (USART0 Receive Pin, Programming Data Input or Pin Change Interrupt 8)
3 PE1 TXD0 Digital pin 01 TX0 (USART0 Transmit Pin or Programming Data Output)
4 PE2 XCK0 AIN0 (USART0 External Clock  Input/Output)
5 PE3 OC3A AIN1 Digital pin 05 PWM
6 PE4 OC3B INT4 Digital pin 02 PWM
7 PE5 OC3C INT5 Digital pin 03 PWM
8 PE6 T3 INT6
9 PE7 CLKO INT7 ICP3
10 VCC VCC
11 GND GND
12 PH0 RXD2 Digital pin 17 RX2 (USART2 Receive Pin)
13 PH1 TXD2 Digital pin 16 TX2 (USART2 Transmit Pin)
14 PH2 XCK2 (USART2 External Clock  Input/Output)
15 PH3 OC4A Digital pin 06 PWM
16 PH4 OC4B Digital pin 07 PWM
17 PH5 OC4C Digital pin 08 PWM
18 PH6 OC2B Digital pin 09 PWM
19 PB0 SS PCINT0 Digital pin 53 SS (SPI Slave Select input or Pin Change Interrupt 0)
20 PB1 SCK PCINT1 Digital pin 52 SCK (SPI Bus Serial Clock or Pin Change Interrupt 1)
21 PB2 MOSI PCINT2 Digital pin 51 MOSI (SPI Bus Master Output/Slave Input or Pin Change Interrupt 2)
22 PB3 MISO PCINT3 Digital pin 50 MISO (SPI Bus Master Input/Slave Output or Pin Change Interrupt 3)
23 PB4 OC2A PCINT4 Digital pin 10 PWM
24 PB5 OC1A PCINT5 Digital pin 11 PWM
25 PB6 OC1B PCINT6 Digital pin 12 PWM
26 PB7 OC0A PCINT7 OC1C Digital pin 13 PWM
27 PH7 T4
28 PG3 TOSC2
29 PG4 TOSC1
30 RESET RESET
31 VCC VCC
32 GND GND
33 XTAL2 XTAL2
34 XTAL1 XTAL1
35 PL0 ICP4 Digital pin 49
36 PL1 ICP5 Digital pin 48
37 PL2 T5 Digital pin 47
38 PL3 OC5A Digital pin 46 PWM
39 PL4 OC5B Digital pin 45 PWM
40 PL5 OC5C Digital pin 44 PWM
41 PL6 Digital pin 43
42 PL7 Digital pin 42
43 PD0 SCL INT0 Digital pin 21 SCL (TWI Serial Clock or External Interrupt0 Input)
44 PD1 SDA INT1 Digital pin 20 SDA (TWI Serial Data or External Interrupt1 Input )
45 PD2 RXD1 INT2 Digital pin 19 RX1 (USART1 Receive Pin or External Interrupt2 Input)
46 PD3 TXD1 INT3 Digital pin 18 TX1 (USART1 Transmit Pin or External Interrupt3 Input)
47 PD4 ICP1
48 PD5 XCK1 (USART1 External Clock  Input/Output)
49 PD6 T1
50 PD7 T0 Digital pin 38
51 PG0 WR Digital pin 41
52 PG1 RD Digital pin 40
53 PC0 A8 Digital pin 37
54 PC1 A9 Digital pin 36
55 PC2 A10 Digital pin 35
56 PC3 A11 Digital pin 34
57 PC4 A12 Digital pin 33
58 PC5 A13 Digital pin 32
59 PC6 A14 Digital pin 31
60 PC7 A15 Digital pin 30
61 VCC VCC
62 GND GND
63 PJ0 RXD3 PCINT9 Digital pin 15 RX3 (USART3 Receive Pin or Pin Change Interrupt 9)
64 PJ1 TXD3 PCINT10 Digital pin 14 TX3 (USART3 Transmit Pin or Pin Change Interrupt 10)
65 PJ2 XCK3 PCINT11 (USART3 External Clock  Input/Output or Pin Change Interrupt 11)
66 PJ3 PCINT12
67 PJ4 PCINT13
68 PJ5 PCINT14
69 PJ6 PCINT 15
70 PG2 ALE Digital pin 39
71 PA7 AD7 Digital pin 29
72 PA6 AD6 Digital pin 28
73 PA5 AD5 Digital pin 27
74 PA4 AD4 Digital pin 26
75 PA3 AD3 Digital pin 25
76 PA2 AD2 Digital pin 24
77 PA1 AD1 Digital pin 23
78 PA0 AD0 Digital pin 22
79 PJ7
80 VCC VCC
81 GND GND
82 PK7 ADC15 PCINT23 Analog pin 15
83 PK6 ADC14 PCINT22 Analog pin 14
84 PK5 ADC13 PCINT21 Analog pin 13
85 PK4 ADC12 PCINT20 Analog pin 12
86 PK3 ADC11 PCINT19 Analog pin 11
87 PK2 ADC10 PCINT18 Analog pin 10
88 PK1 ADC9 PCINT17 Analog pin 09
89 PK0 ADC8 PCINT16 Analog pin 08
90 PF7 ADC7 PCINT15 Analog pin 07
91 PF6 ADC6 PCINT14 Analog pin 06
92 PF5 ADC5 TMS Analog pin 05
93 PF4 ADC4 TMK Analog pin 04
94 PF3 ADC3 Analog pin 03
95 PF2 ADC2 Analog pin 02
96 PF1 ADC1 Analog pin 01
97 PF0 ADC0 Analog pin 00
98 AREF Analog Reference
99 GND GND
100 AVCC VCC

is this forum the right way to get such corrections to the side?

have fun and sunny greetings

Stefan
72  Community / Website and Forum / Re: Mega 2560 Eagle file zip is broken on: April 12, 2012, 02:57:56 am
Hi @ all ;-)
i just downloaded 'http://arduino.cc/en/uploads/Main/arduino-mega2560_R3-reference-design.zip' with firefox.
and with totalcomander it was all fine to unzip it. the files unzipped are also fine.
Sizes:
161,8k  arduino-mega2560_R3-reference-design.zip
294,2k  Arduino_MEGA_2560-Rev3.brd
1,2M     Arduino_MEGA_2560-Rev3.sch

sunny greetings

Stefan

PS: @Moderator : its possible to merge this topic with http://arduino.cc/forum/index.php/topic,98942.0.html ?
73  Community / Website and Forum / table sorting on: April 11, 2012, 11:38:58 am
Hi comunity :-)

i have thought of an feature to the side: sortable tables
could be done with things like http://tablesorter.com/ (it's an MIT / GLP JQuery Plugin)
would be greate for sides like the http://arduino.cc/en/Hacking/PinMapping2560
Its just an idea...

sunny greetings

Stefan
74  Using Arduino / Project Guidance / Motorfader Control / Servo system on: March 03, 2012, 11:09:38 am
Hello Community  smiley

my current approach is to build a Motorfader Controller:
Arduino Uno with Motor Shield gets (for testing purpose fix programmed) values from elsewhere.
it Should drive the Motorfader to the exact level.
so it has to continuously read the current position (analog value) from the fader track.

do someone know about an similar project  or some resources to get some starting point / ideas from?
till know i found things like:
MIDIbox Hardware Platform, Motorfader NG Module
and
DIY Servo ( this one is for very slow positioning for time-laps photos)

I hope there are some Ideas around :-)

sunny greetings

Stefan
75  Using Arduino / Programming Questions / Re: library, struct, typdef and initialization on: February 23, 2012, 01:58:08 pm
Ok found out some things:

initialization is not allowed.

initialization in test sketch looks now this way:
Code:
/**
  * Values for a Testing Thing
  **/
const svXXX someNiceNameing;

void setup()
{
//other stuff...

someNiceNameing.wLevel_Min =     0;
someNiceNameing.wLevel_Max = 65535;
someNiceNameing.wStep_Up =  1;
someNiceNameing.wStep_Down =  1;
someNiceNameing.wDelay_Up =  5;
someNiceNameing.wDelay_Down = 15;

//other stuff...
}

this looks all good
 smiley
sunny greetings
stefan

EDIT:
OK - I have just figured out a Problem:
with the way I do the Initialization of 'someNiceNameing' it is to late :-)
just after declared the variable i 'create' something like:
Code:
/**
  * Values for a Testing Thing
  **/
 svXXX someNiceNameing;

ALib myalib(someNiceNameing);
//...
so the things i initialize the someNiceNameing with dont gets into my ALib because it just gets the original state after svXXX in Empty (undefined) state.

so how can i make this the way i want? with pointers? or is there a other possibility to get it working?
i just need the someNiceNameing once to give the values to myalib.... (as const)
Pages: 1 ... 3 4 [5] 6