当前位置: 首页 > news >正文

Android 14 AAOS audio

文章目录

      • 乘客音频投放到主音频区
      • 动态路由配置
      • controlhal实现的具体流程
      • control hal AudioGain的callback
      • AudioModuleChange变化的通知

乘客音频投放到主音频区

  • 场景:
    是将乘客区的Media 属性的数据通过主屏区的设备进行播放。具体而言 在副屏user11播放的音乐是输出到主屏user10的设备上,当前只针对usage是media的情况。

  • 测试用例:
    有相关的测试用例
    packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/AudioUserAssignmentFragment.java

  • 测试流程:
    首先主屏中选择ask user 11 To Accept,选择确认后。 在user 11 中播放音乐, 这个是时候这个音乐是从10种输出。

  • 修改
    默认支持这种的使用方式。 但是建议media的context 独立使用一个bus address。否则跟media context处于同一个bus address的context都会被路由到主音频区的Media设备中。

  • 基本原理:
    依赖于audioPolicy的setUserIDDeviceAffinity来实现的。这个接口是更新 之前注册audioPolicyMix的情况。是判断注册的policy中
    mAudioPolicy.setUserIdDeviceAffinity(userId, devices);

动态路由配置

  • 场景:
    在同一个区域中 同一个context可以有两个可以播放的device。可以在播放过程中进行切换。
  • 测试用例packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/AudioTestFragment.java
    中的switchToZoneConfigSelected。
    只有在副屏中才有这样的测试,能够进行zoneConfig的切换。
    在选项中选择了另外一个配置之后,进行音乐播放。这个是对应播放数据的地址变成新的配置。
Button zoneConfigSwitchButton =        view.findViewById(R.id.switch_zone_configuration_key_event_button);zoneConfigSwitchButton.setOnClickListener((v) -> switchToZoneConfigSelected());
  • 需要添加的配置:
    car_audio_configuration: 添加两个zoneconfig。这两个zoneConfig的地址不一样, 只能添加到非primary zone的区域。
    比如地址为bus101_audio_zone_1 和bus100_audio_zone_1
    audio_policy_configuration: 添加同样的device,mixport等等。

  • 实现的原理:
    有提供给外部切换的接口。当调用该接口的时候,传递的是要切换的zoneconfig。
    这个zoneconfig 中包含的是要切换的zone的信息 包括address 等等。
    切换就是建立起userid 和 address的关系, 通过audiopolicy的setUserIdDeviceAffinity来实现。
    这个时候在audiopolicyManager 中存储的是userid 和 新的address 的mix。
    播放的时候会获取关系就获取的是新的address。

### AudioControl hal需要实现的功能

  1. registerFocusListener: carAudioService 注册回调到control AudioControl hal 向CarAudioService 请求焦点。
  2. onAudioFocusChange:CarAudioServie通知control 服务层焦点的变化,在control中请求焦点也会在这里告知。
  3. requestAudioFocus: hal层向CarAudioService 请求焦点
  4. abandonAudioFocus:hal层放弃某个焦点的请求。

上述 API 可分别用于从 HAL 请求和放弃音频焦点。作为响应,车载音频服务会考虑音频焦点请求,并将结果异步转发给 IAudioControl#onAudioFocusChange 方法。

  • 增益变化的通知

将hal层(可能外部接入设备的音量变化的信息)音量信息通知给服务层,服务层获取这个信息 进行ui的改变等等操作。
这个事实上是提供了一个外部的设备(比如dsp 放大器)等等音频设备和android CarAudioService交互的路径。

interface IAudioControl {/***   Registers callback to be used by HAL for reporting unexpected gain(s)*    changed and the reason(s) why.**   @param callback The {@link IAudioGainCallback}.*/oneway void registerGainCallback(in IAudioGainCallback callback);
}
interface IAudioGainCallback {/***   Used to indicate that one or more audio device port gains have changed,*   i.e. initiated by HAL, not by CarAudioService.*   This is the counter part of the*   {@link onDevicesToDuckChange}, {@link onDevicesToMuteChange} and,*   {@link setAudioDeviceGainsChanged} APIs.**   @param reasons List of reasons that triggered the given gains changed.*   @param gains List of gains affected by the change.*/void onAudioDeviceGainsChanged(in Reasons[] reasons,in AudioGainConfigInfo[] gains);
}
  • carVolumeGroupInfo

CarVolumeGroup 更改的事件类型

CarVolumeGroupEvent。每个事件都包含三种关键类型的信息:
CarVolumeGroupInfo列表
EventTypes (位图)
ExtraInfos列表

controlhal实现的具体流程

carAudioService init的时候会注册上层服务的回调到audioControlHal中。

public void init() {setupHalAudioFocusListenerLocked();setupHalAudioGainCallbackLocked();setupHalAudioModuleChangeCallbackLocked();
}
  • 首先是AudioFocus的注册

实现在HalAudioFocus中,是将HalAudioFocus的实现注册到AudioControl当中。在默认的AudioControl.cpp的
实现中。通过这个Listener 向CarAudioSerice请求焦点。

    public void registerFocusListener() {mAudioControlWrapper.registerFocusListener(this);}ndk::ScopedAStatus AudioControl::registerFocusListener(const shared_ptr<IFocusListener>& in_listener) {if (in_listener) {std::atomic_store(&mFocusListener, in_listener);} else {LOG(ERROR) << "Unexpected nullptr for listener resulting in no-op.";}}binder_status_t AudioControl::cmdRequestFocus(int fd, const char** args, uint32_t numArgs) {AudioFocusChange focusGain = AudioFocusChange(focusGainValue);if (mFocusListener == nullptr) {dprintf(fd, "Unable to request focus - no focus listener registered\n");return STATUS_BAD_VALUE;}mFocusListener->requestAudioFocus(usage, zoneId, focusGain);dprintf(fd, "Requested focus for usage %s, zoneId %d, and focusGain %d\n", usage.c_str(),zoneId, focusGain);return STATUS_OK;
}

回调到carAudioService中 makeAudioFocusRequestLocked进行焦点的请求。
其调用audioManager的requestAudioFocus请求焦点(这个实际也是回调到CarAudioService进行处理)
同时调用onAuioFocusChange通知到audioControl中。

    public void requestAudioFocus(@AttributeUsage int usage, int zoneId, int focusGain) {synchronized (mLock) {AudioAttributesWrapper audioAttributesWrapper =CarAudioContext.getAudioAttributeWrapperFromUsage(usage);HalAudioFocusRequest currentRequest =mHalFocusRequestsByZoneAndUsage.get(zoneId).get(audioAttributesWrapper);if (currentRequest != null) {if (Slogf.isLoggable(TAG, Log.DEBUG)) {Slogf.d(TAG, "A request already exists for zoneId " + zoneId + " and usage "+ usage);}mAudioControlWrapper.onAudioFocusChange(usage, zoneId, currentRequest.mFocusStatus);} else {makeAudioFocusRequestLocked(audioAttributesWrapper, zoneId, focusGain);}}}private void makeAudioFocusRequestLocked(AudioAttributesWrapper audioAttributesWrapper,int zoneId, int focusGain) {AudioFocusRequest audioFocusRequest =generateFocusRequestLocked(audioAttributesWrapper, zoneId, focusGain);int requestResult = mAudioManager.requestAudioFocus(audioFocusRequest);int resultingFocusGain = focusGain;if (requestResult == AUDIOFOCUS_REQUEST_GRANTED) {HalAudioFocusRequest halAudioFocusRequest =new HalAudioFocusRequest(audioFocusRequest, focusGain);mHalFocusRequestsByZoneAndUsage.get(zoneId).put(audioAttributesWrapper, halAudioFocusRequest);} else if (requestResult == AUDIOFOCUS_REQUEST_FAILED) {resultingFocusGain = AUDIOFOCUS_LOSS;} else if (requestResult == AUDIOFOCUS_REQUEST_DELAYED) {Slogf.w(TAG, "Delayed result for request with audio attributes "+ audioAttributesWrapper + ", zoneId " + zoneId+ ", and focusGain " + focusGain);resultingFocusGain = AUDIOFOCUS_LOSS;}mAudioControlWrapper.onAudioFocusChange(audioAttributesWrapper.getAudioAttributes().getSystemUsage(),zoneId, resultingFocusGain);}

总结: CarAudioService 和 control hal之间的交互,CarAudioService注册
HalFocusListener到control。 control 通过listener提供的requestAudioFocus传递usage、zoneID和focus请求的类型
请求焦点,carAudioService响应焦点请求 之后通过onAudioFocusChange通知control hal焦点请求的情况。

control hal AudioGain的callback

有关的实现在CarAudioGainMonitor中, 跟audioFocus的流程是一样的,都是先注册callback到control。 然后control利用这个callback 将
增益变化的信息传递出来。传递的信息包括两个部分:

  1. Reason 增益变化的原因
  2. AudioGainConfigInfo 包含zoneID、device address、index。
    其中reason的定义见如下。

消息回调到CarAudioGainMonitor中 首先调用如下的函数将hal的reason转换为CarVolumeGroupEvent。
carAudioZone.onAudioGainChanged(reasons, gainsByZones.valueAt(i))
最后是调用的CarVolumeGroup的onAudioGainChanged来实现的。
这个过程会根据当前系统的状态结合gain index信息来 转换最后的EVENT_TYPE。

转换后的event通过下面的回调 回调到carAudioService的onVolumeGroupEvent中、
mCarVolumeInfoWrapper.onVolumeGroupEvent(events);
这里面会回调onGroupVolumeChanged给所有调用registerCarVolumeCallback注册callback的应用
比如VolumeSettingsPreferenceController,收到回调后会调整音量和mute的状态。

    private void setupHalAudioGainCallbackLocked() {AudioControlWrapper audioControlWrapper = getAudioControlWrapperLocked();if (!audioControlWrapper.supportsFeature(AUDIOCONTROL_FEATURE_AUDIO_GAIN_CALLBACK)) {Slogf.e(CarLog.TAG_AUDIO, "HalAudioGainCallback is not supported on this device");return;}mCarAudioGainMonitor = new CarAudioGainMonitor(mAudioControlWrapper,new CarVolumeInfoWrapper(this), mCarAudioZones);mCarAudioGainMonitor.registerAudioGainListener(mHalAudioGainCallback);}public void registerAudioGainListener(HalAudioGainCallback callback) {Objects.requireNonNull(callback, "Hal Audio Gain callback can not be null");mAudioControlWrapper.registerAudioGainCallback(callback);}ndk::ScopedAStatus AudioControl::registerGainCallback(const std::shared_ptr<IAudioGainCallback>& in_callback) {LOG(DEBUG) << ": " << __func__;if (in_callback) {std::atomic_store(&mAudioGainCallback, in_callback);} else {LOG(ERROR) << "Unexpected nullptr for audio gain callback resulting in no-op.";}return ndk::ScopedAStatus::ok();
}binder_status_t AudioControl::cmdOnAudioDeviceGainsChanged(int fd, const char** args,uint32_t numArgs) std::vector<AudioGainConfigInfo> agcis{};for (uint32_t i = 3; i < numArgs; i += 2) {std::string deviceAddress = std::string(args[i]);int32_t index;if (!safelyParseInt(std::string(args[i + 1]), &index)) {dprintf(fd, "Non-integer index provided with request: %s\n",std::string(args[i + 1]).c_str());return STATUS_BAD_VALUE;}AudioGainConfigInfo agci{zoneId, deviceAddress, index};agcis.push_back(agci);}mAudioGainCallback->onAudioDeviceGainsChanged(reasons, agcis);dprintf(fd, "Fired audio gain callback for reasons=%s and gains=%s\n",toEnumString(reasons).c_str(), toString(agcis).c_str());return STATUS_OK;
}
public @interface Reasons {
public static final int FORCED_MASTER_MUTE = 1;
public static final int REMOTE_MUTE = 2;
public static final int TCU_MUTE = 4;
public static final int ADAS_DUCKING = 8;
public static final int NAV_DUCKING = 16;
public static final int PROJECTION_DUCKING = 32;
public static final int THERMAL_LIMITATION = 64;
public static final int SUSPEND_EXIT_VOL_LIMITATION = 128;
public static final int EXTERNAL_AMP_VOL_FEEDBACK = 256;
public static final int OTHER = -2147483648;
}
parcelable AudioGainConfigInfo {/*** The identifier for the audio zone the audio device port associated to this gain belongs to.**/int zoneId;/*** The Audio Output Device Port Address.** This is the address that can be retrieved at JAVA layer using the introspection* {@link android.media.AudioManager#listAudioDevicePorts} API then* {@link audio.media.AudioDeviceInfo#getAddress} API.** At HAL layer, it corresponds to audio_port_v7.audio_port_device_ext.address.** Devices that does not have an address will indicate an empty string "".*/String devicePortAddress;/*** UI Index of the corresponding AudioGain in AudioPort.gains.*/int volumeIndex;
}

总结:CarAudioService通过注册HalAudioGainCallback到control、然后control 在有Gain变化的时候。通过调调用listener的onAudioDeviceGainsChanged
将Gain变化的信息传递出来。CarAudioService将event转换为group的event。在传递给应用等等。

AudioModuleChange变化的通知

处理在CarAudioModuleChangeMonitor,通过将HalAudioModuleChangeCallback注册到control中。之后在control中创建一个或多个AudioPort。将这个Port通过callback的onAudioPortsChanged回调回carAudioService。最后通过
CarVolume的onVolumeGroupEvent通知到各个应用。

    void setModuleChangeCallback(HalAudioModuleChangeCallback callback) {Objects.requireNonNull(callback, "Hal audio module change callback can not be null");mAudioControlWrapper.setModuleChangeCallback(callback);}ndk::ScopedAStatus AudioControl::setModuleChangeCallback(const std::shared_ptr<IModuleChangeCallback>& in_callback) {std::atomic_store(&mModuleChangeCallback, in_callback);return ndk::ScopedAStatus::ok();
}binder_status_t AudioControl::cmdOnAudioPortsChanged(int fd, const char** args, uint32_t numArgs) {if (!checkCallerHasWritePermissions(fd)) {return STATUS_PERMISSION_DENIED;} mModuleChangeCallback->onAudioPortsChanged(ports);
}

相关文章:

Android 14 AAOS audio

文章目录 乘客音频投放到主音频区动态路由配置controlhal实现的具体流程control hal AudioGain的callbackAudioModuleChange变化的通知 乘客音频投放到主音频区 场景&#xff1a; 是将乘客区的Media 属性的数据通过主屏区的设备进行播放。具体而言 在副屏user11播放的音乐是输出…...

文心一言 VS 讯飞星火 VS chatgpt (207)-- 算法导论15.4 4题

四、说明如何只使用表 c 中 2*min(m&#xff0c;n) 个表项及O(1)的额外空间来计算LCS的长度。然后说明如何只用 min(m&#xff0c;n) 个表项及O(1)的额外空间完成相同的工作。要写代码的时候&#xff0c;请用go语言。 文心一言&#xff1a; 在只使用 2 * min(m, n) 个表项和 …...

【论文笔记】Attention Is All You Need

【论文笔记】Attention Is All You Need 文章目录 【论文笔记】Attention Is All You NeedAbstract1 Introduction2 Background补充知识&#xff1a;软注意力 soft attention 和硬注意力 hard attention&#xff1f;补充知识&#xff1a;加法注意力机制和点乘注意力机制Extende…...

(亲测可用)Adobe Photoshop 2024下载与安装

背景介绍&#xff1a;Adobe Photoshop 2024 是全球最受欢迎的图像编辑软件之一&#xff0c;2024年的版本带来了一系列令人印象深刻的功能&#xff1a; AI增强的自动选择和蒙版工具&#xff1a;现在&#xff0c;用户可以更轻松地选择和处理复杂的图像元素。更多的3D渲染功能&…...

uniapp聊天记录本地存储(详细易懂)

目录 目录 1、通过websocket拿取数据 2、获取聊天数据 3、聊天信息存储 、更新 4、读取聊天记录 5、发送信息&#xff0c;信息获取 6、最终效果 1.聊天信息的存储格式 2、样式效果 写聊天项目&#xff0c;使用到了本地存储。需要把聊天信息保存在本地&#xff0c;实时获…...

Vue.js中的$nextTick

其实目前在我现有的开发经历中&#xff0c;我还没有实际运用过$nextTick&#xff0c;今天在看书时&#xff0c;学习到了这个东西&#xff0c;所以做个笔记记录一下。 一、$nextTick是什么&#xff1f; $nextTick 是 Vue提供的一个方法&#xff0c;用于在 DOM 更新之后执行回调…...

python+mysql咖啡店推荐系统django+vue

(1).研究的基本内容 系统的角色分为&#xff1a; 1.管理员 2.会员 3.非会员 角色不同&#xff0c;权限也不相同 技术栈 后端&#xff1a;python 前端&#xff1a;vue.jselementui 框架&#xff1a;django/flask Python版本&#xff1a;python3.7 数据库&#xff1a;mysql5.7…...

综合实验nginx+nfs+kpa

综合实验 实验目的&#xff1a; 静态资源和动态资源分别存放在远端存储NFS上&#xff0c;NFS上数据实现实时备份&#xff0c;用户通过负载访问后端的web服务。实现ngixn负载高可用&#xff0c;当keepalived master宕机&#xff0c;vip能自动跳转到备用节点 实验环境&#xff…...

springboot197基于springboot的毕业设计系统的开发

简介 【毕设源码推荐 javaweb 项目】基于springbootvue 的毕业设计系统的开发 适用于计算机类毕业设计&#xff0c;课程设计参考与学习用途。仅供学习参考&#xff0c; 不得用于商业或者非法用途&#xff0c;否则&#xff0c;一切后果请用户自负。 看运行截图看 第五章 第四章 …...

group by报错

# 报错&#xff1a;[42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column base.biz_org_rep.ID which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_modeonly_full_grou…...

3、云原生安全之falco的部署

文章目录 1、helm安装2、拉去镜像失败与解决3、安装faclo4、安装nfs服务器,配置k8s的持久卷4.1、创建nfs服务器,4.2、部署master节点(nsf服务的客户端)4.3、pv与pvc4.4、假设pv和pvc的配置文件出错了5、安装falcosidekick可视化(建议跳过,直接使用6)6、安装faclo与falco…...

Docker架构概述

Docker是基于Go语言实现的开源容器项目&#xff0c;能够把开发的应用程序自动部署到容器的开源的应用容器引擎。Docker的构想是要实现"Build, Ship and Run Any App, Anywhere"&#xff0c;即通过对应用的封装(Packaging)、分发(Distribution)、部署(Deployment)、运…...

安装 node 错误的配置环境变量之后使用 npm 报错

安装 node 错误的配置环境变量之后使用 npm 报错 node:internal/modules/cjs/loader:1147 throw err; ^ Error: Cannot find module ‘F:\ACodeTools\Node\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js’ at Module._resolveFilename (node:internal/modules/cjs/loa…...

Matlab 最小二乘插值(曲线拟合)

文章目录 一、简介二、实现代码三、实现效果参考资料一、简介 在多项式插值时,当数据点个数较多时,插值会导致多项式曲线阶数过高,带来不稳定因素。因此我们可以通过固定幂基函数的最高次数 m(m < n),来对我们要拟合的曲线进行降阶。之前的函数形式就可以变为: 二、实现…...

AWTK-MVVM 配置文件模型

配置文件模型 AWTK-MVVM 内置了一些配置文件模型&#xff0c;用于读写各种配置文件&#xff0c;比如&#xff0c;JSON/XML/INI/CSV/UBJSON 等。 文件名中可以引用下面的变量。 ${app_dir} 应用程序目录${user_dir} 用户目录${temp_dir} 临时目录 json(url${app_dir}/demos/de…...

【活动】金三银四,前端工程师如何把握求职黄金期

随着春意盎然的气息弥漫大地&#xff0c;程序员群体中也迎来了一年一度的“金三银四”求职热潮。这个时间段对于广大前端工程师而言&#xff0c;不仅象征着生机勃发的新起点&#xff0c;更是他们职业生涯中至关重要的转折点。众多知名公司在这一时期大规模开启招聘通道&#xf…...

萌新学习RSA第二天(离线分解整数N)

1.yafu的使用&#xff08;离线环境分解N&#xff09;、 下载 打开 及使用 下载地址&#xff1a;https://sourceforge.net/projects/yafu/ 在下载好的并解压好的文件夹上鼠标右键打开终端 然后输入.\yafu-x64.exe并回车运行 .\yafu-x64.exe 来到这个页面就OK了 然后输入 fa…...

STM32学习和实践笔记(1): 装好了的keil μVision 5

2019年3月在淘宝上买了这块STM32的开发板&#xff0c;学了一段时间后就丢下了&#xff0c;今天重新捡起来&#xff0c;决定好好学习、天天向上。 对照教程&#xff0c;今天先把keil5装上了。 装的过程有以下几点值得记录下&#xff1a; 1&#xff09;用注册机时&#xff0c;…...

企业计算机服务器中了360勒索病毒如何解密,360后缀勒索病毒处理流程

对于众多的企业来说&#xff0c;企业的数据是企业发展的核心&#xff0c;越来越多的企业开始注重企业的数据安全问题&#xff0c;但随着网络技术的不断发展与应用&#xff0c;网络黑客的攻击加密手段也在不断升级。近期&#xff0c;云天数据恢复中心接到多家企业的求助&#xf…...

【图像拼接/视频拼接】论文精读:Efficient Video Stitching Based on Fast Structure Deformation

第一次来请先看这篇文章:【图像拼接(Image Stitching)】关于【图像拼接论文精读】专栏的相关说明,包含专栏使用说明、创新思路分享等(不定期更新) 图像拼接系列相关论文精读 Seam Carving for Content-Aware Image ResizingAs-Rigid-As-Possible Shape ManipulationAdap…...

DeepSeek 赋能智慧能源:微电网优化调度的智能革新路径

目录 一、智慧能源微电网优化调度概述1.1 智慧能源微电网概念1.2 优化调度的重要性1.3 目前面临的挑战 二、DeepSeek 技术探秘2.1 DeepSeek 技术原理2.2 DeepSeek 独特优势2.3 DeepSeek 在 AI 领域地位 三、DeepSeek 在微电网优化调度中的应用剖析3.1 数据处理与分析3.2 预测与…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

令牌桶 滑动窗口->限流 分布式信号量->限并发的原理 lua脚本分析介绍

文章目录 前言限流限制并发的实际理解限流令牌桶代码实现结果分析令牌桶lua的模拟实现原理总结&#xff1a; 滑动窗口代码实现结果分析lua脚本原理解析 限并发分布式信号量代码实现结果分析lua脚本实现原理 双注解去实现限流 并发结果分析&#xff1a; 实际业务去理解体会统一注…...

EtherNet/IP转DeviceNet协议网关详解

一&#xff0c;设备主要功能 疆鸿智能JH-DVN-EIP本产品是自主研发的一款EtherNet/IP从站功能的通讯网关。该产品主要功能是连接DeviceNet总线和EtherNet/IP网络&#xff0c;本网关连接到EtherNet/IP总线中做为从站使用&#xff0c;连接到DeviceNet总线中做为从站使用。 在自动…...

AI编程--插件对比分析:CodeRider、GitHub Copilot及其他

AI编程插件对比分析&#xff1a;CodeRider、GitHub Copilot及其他 随着人工智能技术的快速发展&#xff0c;AI编程插件已成为提升开发者生产力的重要工具。CodeRider和GitHub Copilot作为市场上的领先者&#xff0c;分别以其独特的特性和生态系统吸引了大量开发者。本文将从功…...

基于TurtleBot3在Gazebo地图实现机器人远程控制

1. TurtleBot3环境配置 # 下载TurtleBot3核心包 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git git clone -b noetic-dev…...

嵌入式学习笔记DAY33(网络编程——TCP)

一、网络架构 C/S &#xff08;client/server 客户端/服务器&#xff09;&#xff1a;由客户端和服务器端两个部分组成。客户端通常是用户使用的应用程序&#xff0c;负责提供用户界面和交互逻辑 &#xff0c;接收用户输入&#xff0c;向服务器发送请求&#xff0c;并展示服务…...

uniapp手机号一键登录保姆级教程(包含前端和后端)

目录 前置条件创建uniapp项目并关联uniClound云空间开启一键登录模块并开通一键登录服务编写云函数并上传部署获取手机号流程(第一种) 前端直接调用云函数获取手机号&#xff08;第三种&#xff09;后台调用云函数获取手机号 错误码常见问题 前置条件 手机安装有sim卡手机开启…...

零知开源——STM32F103RBT6驱动 ICM20948 九轴传感器及 vofa + 上位机可视化教程

STM32F1 本教程使用零知标准板&#xff08;STM32F103RBT6&#xff09;通过I2C驱动ICM20948九轴传感器&#xff0c;实现姿态解算&#xff0c;并通过串口将数据实时发送至VOFA上位机进行3D可视化。代码基于开源库修改优化&#xff0c;适合嵌入式及物联网开发者。在基础驱动上新增…...

nnUNet V2修改网络——暴力替换网络为UNet++

更换前,要用nnUNet V2跑通所用数据集,证明nnUNet V2、数据集、运行环境等没有问题 阅读nnU-Net V2 的 U-Net结构,初步了解要修改的网络,知己知彼,修改起来才能游刃有余。 U-Net存在两个局限,一是网络的最佳深度因应用场景而异,这取决于任务的难度和可用于训练的标注数…...