bsp_Calculus.h
D:/gitt/MicrochipFor32/bsp_Device/bsp_Calculus.h
浏览该文件的文档.00001 /*----------------------------------------------------------------------------------------------------
00002 #
00003 # Copyright (c) 2022 Yuankang Liang(XerolySkinner)
00004 #
00005 # 本软件按原样提供,无任何明示或暗示
00006 # 在任何情况下,作者都不承担任何损害赔偿责任
00007 #
00008 # 使用的许可声明:
00009 # 1. 不得歪曲本软件的来源,你不能声称你编写了原始软件.
00010 # 2. 免费授予以任何目的,前提是版权声明出现在所有副本中.
00011 # 并且版权声明和许可声明同时出现.
00012 # 3. 你有使用,复制,修改,分发,和销售本软件的许可.
00013 # 4. 如果你在产品中使用,产品文档中的声明是赞赏的但不是必须的.
00014 # 5. 本通知不得从任何来源删除或更改.
00015 #
00016 # Yuankang Liang(XerolySkinner)
00017 # E-mail:zabbcccbbaz@163.com
00018 # QQ:2715099320
00019 # Mobile Phone:13005636215
00020 #
00021 # All rights reserved.
00022 */
00023
00033 #pragma once
00034 #ifdef __cplusplus
00035 #include <stdlib.h>
00036 #include "varint.h"
00038 //----------------------------------------------------------------------------------------------------
00039 // 类目
00043 class bsp_Differential{
00044 public:
00045 bsp_Differential(float dt) {
00046 bsp_Differential::dt = dt;}
00047 public:
00048 float Differential(float var);
00049 public:
00050 float dt;
00051 };
00052 //----------------------------------------------------------------------------------------------------
00059 class bsp_Integral {
00060 public:
00061 bsp_Integral(float dt) {
00062 bsp_Integral::result_list = NULL;
00063 bsp_Integral::dt = dt;
00064 bsp_Integral::results = 0;}
00065 ~bsp_Integral(void) {
00066 free(result_list);
00067 result_list = NULL;}
00068 public:
00069 float Integral(float var);
00070 void Integral_set(float results);
00071
00072 float Integral_list(float var);
00073 u32 Integral_makelist(u32 len);
00074 void Integral_dellist(void);
00075 void Integral_clslist(void);
00076 public:
00077 float *result_list;
00078 u32 result_len;
00079 float results;
00080 float dt;
00081 };
00083 #endif