Subversion Repositories DashDisplay

Rev

Rev 16 | Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16 Rev 17
Line 64... Line 64...
64
{ 0, 0 };
64
{ 0, 0 };
65
int16_t dial1[2] =
65
int16_t dial1[2] =
66
{ -1, -1 };
66
{ -1, -1 };
67
 
67
 
68
/* Virtual address defined by the user: 0xFFFF value is prohibited */
68
/* Virtual address defined by the user: 0xFFFF value is prohibited */
69
uint16_t VirtAddVarTab[NumbOfVar] = {0x5555, 0x6666, 0x7777};
69
uint16_t VirtAddVarTab[NumbOfVar] = {0x1111,0x2222 }  ;
70
 
70
 
71
union
71
union
72
{
72
{
73
        PLX_SensorInfo Sensor[MAXRDG];
73
        PLX_SensorInfo Sensor[MAXRDG];
74
        char Bytes[MAXRDG * sizeof(PLX_SensorInfo)];
74
        char Bytes[MAXRDG * sizeof(PLX_SensorInfo)];
Line 310... Line 310...
310
        EnableSerialRxInterrupt(&uc1);
310
        EnableSerialRxInterrupt(&uc1);
311
        EnableSerialRxInterrupt(&uc2);
311
        EnableSerialRxInterrupt(&uc2);
312
 
312
 
313
        EE_Init();
313
        EE_Init();
314
 
314
 
-
 
315
        int i;
-
 
316
        for(i=0;i<2;i++)
-
 
317
        {
-
 
318
          uint16_t val;
-
 
319
 
-
 
320
          uint16_t rc =  EE_ReadVariable(i, &val);
-
 
321
 
-
 
322
          if (rc == 0)
-
 
323
          {
-
 
324
                  dial_pos[i] = val;
-
 
325
          }
-
 
326
        }
-
 
327
 
315
        ap_init(); // set up the approximate math library
328
        ap_init(); // set up the approximate math library
316
 
329
 
317
        int disp;
330
        int disp;
318
 
331
 
319
        ssd1306_begin(1, 0);
332
        ssd1306_begin(1, 0);
320
        dial_origin(64, 60);
333
        dial_origin(64, 60);
321
        dial_size(60);
334
        dial_size(60);
322
 
335
 
323
 
336
 
-
 
337
        // sort out the switch positions
-
 
338
 
-
 
339
 
-
 
340
 
324
 
341
 
325
        for (disp = 0; disp < 2; disp++)
342
        for (disp = 0; disp < 2; disp++)
326
        {
343
        {
327
                select_display(disp);
344
                select_display(disp);
328
                clearDisplay();
345
                clearDisplay();
Line 346... Line 363...
346
 
363
 
347
  /* Infinite loop */
364
  /* Infinite loop */
348
  /* USER CODE BEGIN WHILE */
365
  /* USER CODE BEGIN WHILE */
349
        uint32_t Ticks = HAL_GetTick() + 100;
366
        uint32_t Ticks = HAL_GetTick() + 100;
350
 
367
 
351
        int i;
-
 
352
 
368
 
353
        // PLX decoder protocol
369
        // PLX decoder protocol
354
        char PLXPacket = 0;
370
        char PLXPacket = 0;
355
        for (i = 0; i < MAXRDG; i++)
371
        for (i = 0; i < MAXRDG; i++)
356
        {
372
        {