打印

新年好!第一贴:“灯塔计划.海啸项目“开源项目简介

[复制链接]
3037|37
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
manwjh|  楼主 | 2015-2-28 18:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 manwjh 于 2015-3-10 15:09 编辑

新年好,最近忙些什么?
恭喜发财!我对于未来的产品创新与协作有了一种全新的理解,今年公司将围绕智能硬件实施“灯塔计划”,照亮我们前进的道路,我喜欢这个名字。第一个智能硬件开源项目将要正式开始”灯塔计划.飓风项目“,新的挑战,让是兴奋到失眠。
“灯塔计划”是SZQVC的标准化智能硬件开源计划,核心理念是“标准硬件是躯干,软件是灵魂”,基于同一标准智能硬件也可以产生多样化的产品设计,让软件开发者或团队在1~2个月就可以形成自己的产品并销售,我们为开发者提供产品级别的硬件设计、制造服务,以及软件技术支持,这如同手机+APP。这类项目我还起了另外一个名称:“APP硬件化“。
2015年,我们将启动三个开源项目,伙伴们,约吗?
灯塔计划.飓风项目:
智能硬件:“GPS+电子指南针+陀螺仪+OLED屏显示”
产品化建议方向:旅行记录,GPS精确时钟等。
项目状态:硬件设计已经验证完成, 标准sdk开发完成。


QQ: 49370295 "灯塔计划“

2015/3/2 上传“灯塔计划"PDF
灯塔计划-介绍.pdf (581.51 KB)





相关帖子

沙发
manwjh|  楼主 | 2015-2-28 18:21 | 只看该作者
本帖最后由 manwjh 于 2015-2-28 18:29 编辑

标准智能硬件规格



使用特权

评论回复
板凳
manwjh|  楼主 | 2015-2-28 18:34 | 只看该作者
本帖最后由 manwjh 于 2015-3-2 17:30 编辑

SZQVC基于开源的软件平台开发的产品展示:GPX轨迹记录实例:


UI界面:


使用特权

评论回复
地板
manwjh|  楼主 | 2015-2-28 18:36 | 只看该作者
本帖最后由 manwjh 于 2015-3-2 09:12 编辑

资料下载. 陆续更新...

IC资料(如有缺失,请联系QQ(49370295):
BMA250.pdf (1.3 MB)

BST-BMP280-DS001-09.pdf (1.27 MB)

HMC5883L中文数据手册.pdf (469.79 KB)


DEV.SDK包下载(如编译和使用存在问题,请联系QQ:
...


DEV.SDK 说明文档

使用特权

评论回复
5
gyh02133| | 2015-2-28 20:58 | 只看该作者
没有人叫好!!!!

使用特权

评论回复
6
xinyipcb| | 2015-3-1 07:52 | 只看该作者
看了楼主的网站,很不错啊,支持一下。

使用特权

评论回复
7
dirtwillfly| | 2015-3-1 14:46 | 只看该作者
bucuo

使用特权

评论回复
8
luzd2009| | 2015-3-1 16:56 | 只看该作者
支持支持啊

使用特权

评论回复
9
lvyunhua| | 2015-3-1 18:13 | 只看该作者
:lol 支持楼主。

使用特权

评论回复
10
manwjh|  楼主 | 2015-3-2 09:13 | 只看该作者
gyh02133 发表于 2015-2-28 20:58
没有人叫好!!!!

慢慢的都会有的! 谢谢!

使用特权

评论回复
11
manwjh|  楼主 | 2015-3-2 09:13 | 只看该作者
xinyipcb 发表于 2015-3-1 07:52
看了楼主的网站,很不错啊,支持一下。

感谢

使用特权

评论回复
12
liuyu305| | 2015-3-2 13:40 | 只看该作者
感觉这种方式很难盈利

使用特权

评论回复
13
manwjh|  楼主 | 2015-3-2 14:05 | 只看该作者
liuyu305 发表于 2015-3-2 13:40
感觉这种方式很难盈利

没想好怎么盈利!  想想, just do it!
希望支持

使用特权

评论回复
14
manwjh|  楼主 | 2015-3-2 17:32 | 只看该作者
本帖最后由 manwjh 于 2015-3-2 17:35 编辑

DAY 1: 发布‘灯塔计划“pdf.  代码整理中,读取过年回家路线的存储文件。希望这周能把代码基本整理完成!

使用特权

评论回复
15
manwjh|  楼主 | 2015-3-2 17:43 | 只看该作者

谢谢

使用特权

评论回复
16
manwjh|  楼主 | 2015-3-3 09:07 | 只看该作者
本帖最后由 manwjh 于 2015-3-3 09:51 编辑

代码范例(期待您的参与?)
/**

  ******************************************************************************
  * @file    graphical.c
  * @author  SZQVC
  * @version V0.2.8
  * @date    2015.2.14
  * @brief   灯塔计划.海啸项目 (QQ:49370295)
  ******************************************************************************
  * @Attention                                                                 *
  *                                                                            *
  * <h2><center>&copy; COPYRIGHT 2015 SZQVC</center></h2>                      *
  *                                                                            *
  * 文件版权归“深圳权成安视科技有限公司”(简称SZQVC)所有。                   *
  *                                                                            *
  *        http://www.szqvc.com                                                *
  *                                                                            *
  ******************************************************************************

**/
#include "sys_includes.h"
#include "font.c"
#include "my_ico.c"

#define PI  3.14159265358979324
#define TWOPI (PI*2)

/*----------------------------------------------------------------------------*/
void Glph_ClrArea(uint8_t x1,uint8_t y1, uint8_t width, uint8_t high)
{
  DrawFill(x1,y1,x1+width-1,y1+high-1,0);
}


/*******************************************************************************
* Function Name  : GetASCIICode
* Description    : 读取ASCII字符点阵数据
* Input          : 字体(font_t),字符(a)
* Output         :
* Return         : 数据起始指针
* Attention      : None
*******************************************************************************/
const uint8_t *GetAsciiBitmap(uint8_t font_t, char a)
{
  char tmp;
  const uint8_t *bitmap_p;

  tmp = a;

  if( font_t==MS_GOTHIC_8X16 ){
    if( (tmp>=' ')&&(tmp<='~') ){  
      bitmap_p = (uint8_t*)&Bitmap_MsGothic_8X16[tmp-32];
    }
  }else if( font_t==LED_8X16 ){
    if( (tmp>='0')&&(tmp<='9') ){
      bitmap_p = (uint8_t*)&Bitmap_LED_8X16[tmp-'0'];
    }else{
      switch( tmp ){
        case ' ':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[10];
          break;
        case ':':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[13];
          break;
        case '.':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[11];
          break;
        case '`':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[12];
          break;
        case '/':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[14];
          break;
        case '-':
          bitmap_p = (uint8_t*)&Bitmap_LED_8X16[15];
          break;
      }
    }
  }else if( font_t==ASCII_5X7 ){
    tmp -= 32;
    if( tmp<sizeof(Bitmap_ASCII_5X7)/5 )
      bitmap_p = (uint8_t*)&Bitmap_ASCII_5X7[tmp];
    else
      bitmap_p = (uint8_t*)&Bitmap_ASCII_5X7['?'-32];
  }else if( font_t==LED_5X7 ){
    tmp -= 32;
    if( tmp<sizeof(Bitmap_LED_5X7)/5 )
      bitmap_p = (uint8_t*)&Bitmap_LED_5X7[tmp];
    else
      bitmap_p = (uint8_t*)&Bitmap_LED_5X7['?'-32];
  }  
  return bitmap_p;
}

/*******************************************************************************
* Function Name  : Glph_Print
* Description    : 字符打印输出
* Input          : 屏幕坐标(x,y), 字体(font_t), 字符串( *dt)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_Print(uint8_t x, uint8_t y, uint8_t font_t, char *dt)
{
  char byte_cnt=0,tmp;
  const uint8_t *p;
  uint8_t font_width,font_high,bitmap_t;

  switch(font_t&0x7f){
    case LED_8X16:
      font_width=8;
      font_high=16;
      bitmap_t = BIT_MAP_HORI;
    break;

    case LED_5X7:
      font_width = 5;
      font_high = 8;
      bitmap_t = BIT_MAP_VERT;
    break;

    case MS_GOTHIC_8X16:
      font_width=8;
      font_high=16;
      bitmap_t = BIT_MAP_HORI;
    break;


    default:
      font_t = ASCII_5X7;
    case ASCII_5X7:
      font_width=5;
      font_high=8;
      bitmap_t = BIT_MAP_VERT;
    break;
  }

  byte_cnt = 0;
  do{
    tmp = *dt++;
    if( (tmp!=0)&&(tmp!='\r')&&(tmp!='\n')&&(tmp<0x80) ){
      p = GetAsciiBitmap( font_t&0x7f,tmp);
      if( font_t&FONT_HIGHLIGHT )
        DrawBitmap(x+byte_cnt*font_width,y,bitmap_t|BIT_MAP_REVERSE,font_width,font_high,(uint8_t*)p);
      else
        DrawBitmap(x+byte_cnt*font_width,y,bitmap_t,font_width,font_high,(uint8_t*)p);
      byte_cnt++;
    }else
      break;
  }while(1);
}


/*******************************************************************************
* Function Name  : Glph_Wave
* Description    : 绘制波形曲线
* Input          : 屏幕坐标(x,y), 波形数据WAVE_INFO(*cfg)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_Wave(uint8_t x, uint8_t y, WAVE_INFO *cfg)
{
  uint16_t i;
  int16_t y_value;
  int16_t *p=(int16_t*)cfg->buffer;
  int16_t val_mid,tmp;
  int16_t scale;
  //
  cfg->max_value=-32768,cfg->min_value=32767;

  //寻找最大值,最小值
  if( cfg->buffer_cnt>1 ){
    for( i=0; i<cfg->buffer_cnt; i++){
      if( *p>cfg->max_value )
        cfg->max_value = *p;
      if( *p<cfg->min_value )
        cfg->min_value = *p;
      p++;
    }
  }else if(cfg->buffer_cnt==1) {
    cfg->min_value = *p;
    cfg->max_value = *p;
  }else
     return;
  //Y坐标中心
  val_mid = (cfg->max_value/cfg->minification+cfg->min_value/cfg->minification)/2;

  //绘制波形
  DrawFill(x,y,x+cfg->img_width,y+cfg->img_high,0);
  //
  if( cfg->wave_type==0 ){
    i = cfg->buffer_cnt;
    p = cfg->buffer;
    do{
      tmp = *p++/cfg->minification-val_mid;
      //中心坐标偏值
      y_value = cfg->img_high/2-tmp;
      //是否超出坐标
      if( y_value<0 )
        y_value = 0;
      else if( y_value>(cfg->img_high-1) )
        y_value = cfg->img_high-1;

      DrawPoint(x+i,y+y_value,1);
      i--;
    }while(i>0);
  }else{
    scale = (cfg->max_value-cfg->min_value)/cfg->img_high;
    if(scale<cfg->minification)
      scale = cfg->minification;  
    i = cfg->buffer_cnt;
    p = cfg->buffer;
    do{
      y_value = (*p++-cfg->min_value)/scale;
      //是否超出坐标
      if( y_value<0 )
        y_value = 0;
      else if( y_value>(cfg->img_high-1) )
        y_value = cfg->img_high-1;
      //
      //DrawPoint(x+i,y+y_value,1);
      DrawFill(x+i,y+cfg->img_high-y_value-1,x+i,y+cfg->img_high-1,1);
      i--;
    }while(i>0);
  }
}

/*******************************************************************************
* Function Name  : Glph_DrawBattery
* Description    : 绘制电池电量图标
* Input          : 屏幕坐标(x,y), 电池电量等级(st)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_DrawBattery(uint8_t x, uint8_t y, uint8_t st)
{
  uint8_t i = 0;

  DrawBitmap(x,y,BIT_MAP_VERT,28,16,(uint8_t*)ICO_V_BAT_28X16);
  if( st==ICO_BAT_CHARGE ){
    DrawBitmap(x+8,y+4,BIT_MAP_VERT,10,8,(uint8_t*)ICO_V_BAT_CHG_10X8);
  }else if( (st>=ICO_BAT_1)&&(st<=ICO_BAT_4) ){
    for( i=0; i<=st ;i++ ){
      DrawBitmap((x+5)+(i-1)*4,y+4,BIT_MAP_VERT,4,8,(uint8_t*)ICO_V_BAT_LEVEL_4X8);
    }
  }
}

/*******************************************************************************
* Function Name  : Glph_DrawLine
* Description    : 绘制直线(从起点到终点)
* Input          : 屏幕开始坐标(x1,y1), 屏幕开始坐标(x2,y2),白点/黑点(t)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
__inline void swap_int(int16_t *a, int16_t *b)
{
  *a ^= *b;
  *b ^= *a;
  *a ^= *b;
}

void Glph_DrawLine(int16_t x1,int16_t y1, int16_t x2, int16_t y2, uint8_t t )
{
  int16_t ix, iy, cx,cy,n2dy,n2dydx,d,
      dx = abs(x2-x1),
      dy = abs(y2-y1),
      yy=0;

  if( dx<dy ){
    yy = 1;
    swap_int(&x1,&y1);
    swap_int(&x2,&y2);
    swap_int(&dx,&dy);
  }

  ix = (x2-x1)>0 ? 1:-1;
  iy = (y2-y1)>0 ? 1:-1;
  cx = x1;
  cy = y1;
  n2dy = dy*2;
  n2dydx = (dy-dx)*2;
  d = dy*2 - dx;

  //如果直线与X轴的夹角大于45度  
  if( yy ){
    while( cx!=x2 ){
      if(d<0){
        d += n2dy;
      }else{
        cy += iy;
        d += n2dydx;
      }
      DrawPoint(cy, cx, t);
      cx += ix;
    }
  }
  //如果直线与X轴的夹角小于45度
  else{
    while( cx!=x2 ){
      if( d<0 ){
        d += n2dy;
      }else{
        cy += iy;
        d += n2dydx;
      }
      DrawPoint(cx, cy, t);
      cx += ix;
    }
  }
}

/*******************************************************************************
* Function Name  : Glph_DrawXLine
* Description    : 绘制X射线
* Input          : 屏幕开始坐标(x1,y1), 射线长度(r),射线角度(angle弧度),白点/黑点(t)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_DrawXLine(uint8_t x1, uint8_t y1, uint8_t r, float angle, uint8_t t)
{
  int16_t x2,y2;
  float tmp,tt,radian;

  radian = angle;
  tmp = cos(radian);
  tt = tmp*r+0.5;
  x2 = x1 + tt;
  tmp = sin(radian);
  tt = tmp*r+0.5;
  y2 = y1 + tt;

  Glph_DrawLine(x1,y1,x2,y2,t);
}

/*******************************************************************************
* Function Name  : Glph_Drawcircle
* Description    : 依据圆点和半径画圆
* Input          : 屏幕开始坐标(x1,y1), 半径(r),是否填充(fill),白点/黑点(c)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
__inline void draw_circle_8( u16 xc, u16 yc, u16 x, u16 y, u16 c)   
{   
     // 参数 c 为颜色值   
     DrawPoint( xc + x, yc + y, c);   
     DrawPoint( xc - x, yc + y, c);   
     DrawPoint( xc + x, yc - y, c);   
     DrawPoint( xc - x, yc - y, c);   
     DrawPoint( xc + y, yc + x, c);   
     DrawPoint( xc - y, yc + x, c);   
     DrawPoint( xc + y, yc - x, c);   
     DrawPoint( xc - y, yc - x, c);   
}      
//Bresenham's circle algorithm   
void Glph_Drawcircle( u16 xc, u16 yc, u16 r, u16 fill, u16 c)  
{   
     // (xc, yc) 为圆心,r 为半径   
     // fill 为是否填充   
     // c 为颜色值      
     // 如果圆在图片可见区域外,直接退出   

    int x = 0, y = r, yi, d;   
        d = 3 - 2 * r;

     if(xc + r < 0 || xc - r >= 240 || yc + r < 0 || yc - r >= 320)   
     {  
         return;  
     }     
     if(fill)  
     {   
         // 如果填充(画实心圆)   
         while(x <= y)   
         {   
             for(yi = x; yi <= y; yi ++)   
             {  
                 draw_circle_8(xc, yc, x, yi, c);   
             }  
             if(d < 0)   
             {   
                 d = d + 4 * x + 6;   
             }   
             else   
             {   
                 d = d + 4 * (x - y);   
                 y --;   
             }   

             x++;   
         }   
     }   
     else   
     {   
         // 如果不填充(画空心圆)   
         while (x <= y)   
         {   
             draw_circle_8(xc, yc, x, y, c);   
             if(d < 0)   
             {   
                 d = d + 4 * x + 6;   
             }   
             else   
             {   
                 d = d + 4 * (x - y);   
                 y --;   
             }   
             x ++;   
         }   
     }   
}  

/*******************************************************************************
* Function Name  : Glph_DrawRectangle
* Description    : 画长方型
* Input          : 第一点坐标(x1,y1), 第二点坐标(x2,y2),白点/黑点(c)
* Output         :
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_DrawRectangle(uint8_t x1,uint8_t y1, uint8_t x2, uint8_t y2, uint8_t t )
{
  int i,j;
  if(x1>x2){
    i = x1; j = x2;
  }else{
    i = x2; j = x1;
  }
  do{
    DrawPoint(j,y1,t);
    DrawPoint(j,y2,t);
    j++;
  }while(j<=i);
  //
  if(y1>y2){
    i = y1; j = y2;
  }else{
    i = y2; j = y1;
  }
  do{
    DrawPoint(x1,j,t);
    DrawPoint(x2,j,t);
    j++;
  }while(j<=i);
}

/*******************************************************************************
* Function Name  : Glph_LoadGif
* Description    : 加载GIF
* Input          : 图象区域坐标(x1,y1), 是否循环(loop), GIF图象指针(*p),
* Output         : GIF_INFO *gif_play
* Return         : None
* Attention      : None
*******************************************************************************/
void Glph_LoadGif(uint8_t x, uint8_t y, uint8_t loop, GIF_INFO *gif_play, uint8_t *p)
{
    gif_play->scr_pos_x = (uint16_t)x;
    gif_play->scr_pos_y = (uint16_t)y;
    gif_play->img_width = (uint8_t)p[0];
    gif_play->img_high = (uint8_t)p[1];
    gif_play->frame_num = (uint8_t)p[2];
    gif_play->speed = (uint8_t)p[3];
    gif_play->play_no = 0;
    gif_play->loop = loop;
    gif_play->p = (uint8_t*)(p+gif_play->img_width);
}

/*******************************************************************************
* Function Name  : Glph_PlayGif
* Description    : 播放GIF
* Input          : gif播放指针
* Output         : None
* Return         : None
* Attention      : 该函数需要不断运行,依据内部的定时器判断换帧(最小间隔每帧/10ms)
*******************************************************************************/
void Glph_PlayGif(GIF_INFO *gif)
{
    uint16_t p_offset;

    if( TimeOutCheck_ms(gif->tick_msk+gif->speed*10) ){
      gif->tick_msk = GetSysTick_ms();
      if( ( gif->loop == 1)&&(gif->play_no >= gif->frame_num) ){
          gif->play_no = 0;
      }
      //
      if( gif->play_no<gif->frame_num ){
        p_offset = gif->play_no*(gif->img_width*gif->img_high/8);
        DrawBitmap(gif->scr_pos_x,gif->scr_pos_y,BIT_MAP_VERT,gif->img_width,gif->img_high,(uint8_t*)(gif->p+p_offset));
        gif->play_no++;
      }
    }
}

#if 0
void test_glph(void)
{
  int i,j;
  float angle=0.0;
/*  
  do{
    Glph_DrawXLine(15,15,15,angle,1);
    OLED_ReflashTask();
    angle +=30.0;
  }while(angle<360);
  Glph_Drawcircle(32,16,5,0,1);
*/
  Glph_DrawLine(0,0,127,31,1);
  //
  display_reflash();
  while(1);
}
#endif


/*********************************************************************************************************
      END FILE
*********************************************************************************************************/


  

使用特权

评论回复
17
manwjh|  楼主 | 2015-3-3 09:48 | 只看该作者
开机启动

使用特权

评论回复
18
LeCreateStudio| | 2015-3-3 10:36 | 只看该作者
开源不错,软件开源么?

使用特权

评论回复
19
manwjh|  楼主 | 2015-3-3 10:58 | 只看该作者
LeCreateStudio 发表于 2015-3-3 10:36
开源不错,软件开源么?

基础软件架构开源, 所有ic驱动开源(应用级别)。

因为算法是和应用关联,所以你需要什么算法可以问我,也许我可以解答。

所有用户界面不开源, 希望开发者拥有各自的应用方向和理解。

最终,我们希望可以携手开发者一起生产和推广产品。

使用特权

评论回复
20
manwjh|  楼主 | 2015-3-10 15:10 | 只看该作者
这帖子冷到❤️衰,弄个视频!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

16

主题

70

帖子

2

粉丝